add core docs

This commit is contained in:
2025-02-10 09:48:59 -06:00
parent 7283ced1ca
commit 375a6ad3a4
74 changed files with 5148 additions and 643 deletions

View File

@@ -1,25 +1,15 @@
# render
## render
### _main <sub>object</sub>
A handle for low-level GPU operations via SDL GPU. Freed on GC.
An application window, created via prosperon.engine_start or SDL calls. Freed on GC.
### device <sub>object</sub>
### stencil_writer(...args) <sub>function</sub>
#### present
Perform the per-frame rendering and present the final swapchain image, including imgui pass if available.
**Returns**: None
### stencil_writer(...args)
### fillmask(ref)
### fillmask(ref) <sub>function</sub>
Draw a fullscreen shape using a 'screenfill' shader to populate the stencil buffer with a given reference.
@@ -31,7 +21,7 @@ Draw a fullscreen shape using a 'screenfill' shader to populate the stencil buff
**Returns**: None
### mask(image, pos, scale, rotation, ref)
### mask(image, pos, scale, rotation, ref) <sub>function</sub>
Draw an image to the stencil buffer, marking its area with a specified reference value.
@@ -51,7 +41,7 @@ Draw an image to the stencil buffer, marking its area with a specified reference
**Returns**: None
### viewport(rect)
### viewport(rect) <sub>function</sub>
Set the GPU viewport to the specified rectangle.
@@ -63,7 +53,7 @@ Set the GPU viewport to the specified rectangle.
**Returns**: None
### scissor(rect)
### scissor(rect) <sub>function</sub>
Set the GPU scissor region to the specified rectangle (alias of render.viewport).
@@ -75,7 +65,7 @@ Set the GPU scissor region to the specified rectangle (alias of render.viewport)
**Returns**: None
### queue(cmd)
### queue(cmd) <sub>function</sub>
Enqueue one or more draw commands. These commands are batched until render_camera is called.
@@ -87,7 +77,7 @@ Enqueue one or more draw commands. These commands are batched until render_camer
**Returns**: None
### setup_draw
### setup_draw() <sub>function</sub>
Switch the current queue to the primary scene render queue, then invoke 'prosperon.draw' if defined.
@@ -96,7 +86,7 @@ Switch the current queue to the primary scene render queue, then invoke 'prosper
**Returns**: None
### setup_hud
### setup_hud() <sub>function</sub>
Switch the current queue to the HUD render queue, then invoke 'prosperon.hud' if defined.