Macaw OS C reference

Function gpu_frustum

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

Sets up a perspective projection by where its edges are. gpu_perspective is easier to think about, and this lets you make a lopsided view.

Parameters

leftdouble
The x of the left edge, at the near distance.
rightdouble
The x of the right edge, at the near distance.
bottomdouble
The y of the bottom edge, at the near distance.
topdouble
The y of the top edge, at the near distance.
zneardouble
The nearest distance it draws, more than 0.
zfardouble
The furthest distance it draws.

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