Function gpu_perspective
#include <macawgpu.h>void gpu_perspective(
double fovy,
double aspect,
double znear,
double zfar
);
Sets up a perspective projection, where far things look smaller. Call it on the projection matrix, after gpu_loadidentity.
Parameters
fovydouble- How much the camera sees from top to bottom, in degrees. 60 is usual.
aspectdouble- The picture's width divided by its height. 0 uses the window's (or the viewport's).
zneardouble- The nearest distance it draws, more than 0. 0 means 0.1.
zfardouble- The furthest distance it draws. 0 means 100.
In Matrices, with gpu_matrixmode, gpu_loadidentity, gpu_pushmatrix, gpu_popmatrix, gpu_translate, gpu_rotate, gpu_scale, gpu_ortho, gpu_frustum, gpu_lookat, gpu_loadmatrix, gpu_multmatrix, gpu_getmatrix, gpu_project.