Macaw OS C reference

Function gpu_viewport

#include <macawgpu.h>
void gpu_viewport(int x, int y, int w, int h);

Makes drawing go into one part of the window, like a smaller window inside it.

Parameters

xint
The part's left edge, in pixels from the window's left.
yint
The part's top edge, in pixels from the window's top.
wint
Its width in pixels. 0 goes back to the whole window.
hint
Its height in pixels. 0 goes back to the whole window.

In State, with gpu_enable, gpu_disable, gpu_isenabled, gpu_depthmask, gpu_cullface, gpu_frontface, gpu_clearcolor, gpu_clear, gpu_reset.