Files
prosperon/docs/api/modules/render.md
John Alanbrook 83b798e365 Add Hugo website and rewrite docs to match current engine
New Hugo site in website/ with prosperon.dev theme (blue/gold/castle
aesthetic), docs sidebar navigation, and content pages. Rewrote all
doc files to align with the actual codebase: compositor+film2d
rendering, use() modules (no global prosperon object), Pit language,
script+JSON entity model. Added entities.md, front matter to all
70+ API docs, and updated API index for current module architecture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:09:55 -06:00

1.8 KiB

title, type
title type
render docs

render

_main object

A handle for low-level GPU operations via SDL GPU. Freed on GC.

device object

stencil_writer(...args) function

fillmask(ref) function

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) function

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.

scale: Optional scaling applied to the texture.

rotation: Optional rotation in radians (unused by default).

ref: The stencil reference value to write.

Returns: None

viewport(rect) function

Set the GPU viewport to the specified rectangle.

rect: A rectangle [x, y, width, height].

Returns: None

scissor(rect) function

Set the GPU scissor region to the specified rectangle (alias of render.viewport).

rect: A rectangle [x, y, width, height].

Returns: None

queue(cmd) function

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() function

Switch the current queue to the primary scene render queue, then invoke 'prosperon.draw' if defined.

Returns: None

setup_hud() function

Switch the current queue to the HUD render queue, then invoke 'prosperon.hud' if defined.

Returns: None