CF_CanvasParams¶
Category: graphics
GitHub: cute_graphics.h
A texture the GPU can draw upon (with an optional depth/stencil texture).
Struct Members | Description |
---|---|
const char* name |
The name of the canvas, for debug purposes. |
CF_TextureParams target |
The texture used to store pixel information when rendering to the canvas. See CF_TextureParams. |
bool depth_stencil_enable |
Defaults to false. If true enables a depth-stencil buffer attachment. |
CF_TextureParams depth_stencil_target |
The texture used to store depth and stencil information when rendering to the canvas. See CF_TextureParams. |
CF_SampleCount sample_count |
MSAA sample count; must be 1, 2, 4, or 8 (see CF_SampleCount). Defaults to 1 (no MSAA). |
Remarks¶
The clear color settings are used when cf_apply_canvas is called. You can change the clear color by calling cf_clear_color. Usually you will not need to create a canvas at all, as it's an advanced feature for users who want to draw to an off-screen buffer. Use cases can include rendering reflections, advanced lighting techniques, or other kinds of multi-pass effects.
Related Pages¶
cf_clear_color
cf_canvas_defaults
cf_make_canvas
cf_destroy_canvas
cf_apply_canvas