Macaw OS C reference

Function gpu_ortho

#include <macawgpu.h>
void gpu_ortho(
    double left,
    double right,
    double bottom,
    double top,
    double znear,
    double zfar
);

Sets up a flat projection, where things stay the same size however far away they are. Use it for 2D drawing and maps.

Parameters

leftdouble
The x at the picture's left edge.
rightdouble
The x at the picture's right edge.
bottomdouble
The y at the picture's bottom edge.
topdouble
The y at the picture's top edge.
zneardouble
The nearest distance it draws. Lua's usual is -1.
zfardouble
The furthest distance it draws. Lua's usual is 1.

In Matrices, with gpu_matrixmode, gpu_loadidentity, gpu_pushmatrix, gpu_popmatrix, gpu_translate, gpu_rotate, gpu_scale, gpu_perspective, gpu_frustum, gpu_lookat, gpu_loadmatrix, gpu_multmatrix, gpu_getmatrix, gpu_project.