Skip to content

cf_canvas_set_clear_color2

Category: graphics
GitHub: cute_graphics.h


Gives one color target of a multi-target canvas its own clear color.

void cf_canvas_set_clear_color2(CF_Canvas canvas, int index, CF_Color color);
Parameters Description
canvas The canvas.
index Which color target, from 0 to target_count - 1.
color The color this target clears to from now on.

Remarks

A g-buffer typically wants different clears per attachment -- transparent black for color, far-plane values for depth-carrying targets. cf_canvas_set_clear_color sets every target at once; this sets just one. Targets with no override clear to the global cf_clear_color.

CF_Canvas
cf_canvas_set_clear_color
cf_clear_color
CF_CanvasParams