Skip to content

cf_apply_viewport

Category: graphics
GitHub: cute_graphics.h


Sets up a viewport to render within.

void cf_apply_viewport(int x, int y, int w, int h);
Parameters Description
x Center of the viewport on the x-axis.
y Center of the viewport on the y-axis.
w Width of the viewport in pixels.
h Height of the viewport in pixels.

Remarks

The viewport is a window on the screen to render within. The canvas will be stretched to fit onto the viewport. You must only call this after calling cf_apply_shader.

cf_apply_canvas
cf_apply_scissor