Code archives/3D Graphics - Misc/glPerspective

This code has been declared by its author to be Public Domain code.

Download source code

glPerspective by Oddball2007
Here is an alternative to gluPerspective that uses the more intuative fovx instead of fovy. All other params. stay the same.
Function glPerspective( fovx:Float, ratio:Float, near:Float, far:Float )
		Local x:Float=Tan(fovx/2.0)*near
		Local y:Float=x/ratio
		glFrustum -x,x,-y,y,near,far
End Function

Comments

None.

Code Archives Forum