cf_draw_push_layer¶
Category: draw
GitHub: cute_draw.h
Pushes a draw layer.
| Parameters | Description |
|---|---|
layer |
The layer. |
Remarks¶
Draw layers are sorted before rendering. Lower numbers are rendered first, while larger numbers are rendered last. This can be used to pick which sprites/shapes should draw on top of each other. Layers are stream-structural state, so they also order 3d mesh submissions (cf_draw3d_mesh) against 2d drawing and each other. Each layer keeps its own command queue, so switching layers is cheap: draws recorded on the same layer batch together no matter how many times other layers were visited in between.
Related Pages¶
cf_draw_push_z
cf_draw_pop_layer
cf_draw_peek_layer
cf_draw3d_mesh