This function builds a perspective projection matrix matrix based on the dimensions of the near plane, using the specified parameters listed below.
matrix_build_projection_perspective(width, height, znear, zfar);
Argument Description w The width of the projection. h The height of the projection. znear The near clipping plane. zfar The far clipping plane.
var projmat =
matrix_build_projection_perspective(640, 480, 1.0, 32000.0);
The above code creates a perspective projection and then uses the matrix returned to set the camera assigned to view port.