document c types
This commit is contained in:
@@ -1,29 +1,42 @@
|
||||
# render
|
||||
|
||||
### present()
|
||||
## render
|
||||
|
||||
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.
|
||||
|
||||
|
||||
#### present
|
||||
|
||||
Perform the per-frame rendering and present the final swapchain image, including imgui pass if available.
|
||||
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
### stencil_writer(...args)
|
||||
|
||||
## stencil_writer(...args)
|
||||
|
||||
## fillmask(ref)
|
||||
### fillmask(ref)
|
||||
|
||||
Draw a fullscreen shape using a 'screenfill' shader to populate the stencil buffer with a given reference.
|
||||
|
||||
|
||||
|
||||
**ref**: The stencil reference value to write.
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
## mask(image, pos, scale, rotation, ref)
|
||||
### mask(image, pos, scale, rotation, ref)
|
||||
|
||||
Draw an image to the stencil buffer, marking its area with a specified reference value.
|
||||
|
||||
|
||||
|
||||
**image**: A texture or string path (which is converted to a texture).
|
||||
|
||||
**pos**: The translation (x, y) for the image placement.
|
||||
@@ -34,52 +47,60 @@ Draw an image to the stencil buffer, marking its area with a specified reference
|
||||
|
||||
**ref**: The stencil reference value to write.
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
## viewport(rect)
|
||||
### viewport(rect)
|
||||
|
||||
Set the GPU viewport to the specified rectangle.
|
||||
|
||||
|
||||
|
||||
**rect**: A rectangle [x, y, width, height].
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
## scissor(rect)
|
||||
### scissor(rect)
|
||||
|
||||
Set the GPU scissor region to the specified rectangle (alias of render.viewport).
|
||||
|
||||
|
||||
|
||||
**rect**: A rectangle [x, y, width, height].
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
## queue(cmd)
|
||||
### queue(cmd)
|
||||
|
||||
Enqueue one or more draw commands. These commands are batched until render_camera is called.
|
||||
|
||||
|
||||
|
||||
**cmd**: Either a single command object or an array of command objects.
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
## setup_draw()
|
||||
### setup_draw
|
||||
|
||||
Switch the current queue to the primary scene render queue, then invoke 'prosperon.draw' if defined.
|
||||
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
## setup_hud()
|
||||
### setup_hud
|
||||
|
||||
Switch the current queue to the HUD render queue, then invoke 'prosperon.hud' if defined.
|
||||
|
||||
|
||||
|
||||
**Returns**: None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user