gluPerspective implementation?

Started by
0 comments, last by Ranger_One 23 years ago
How does gluPerspective() function? It is the only command I use from GLUT and I want to eliminate the .dll requirement. I assume it uses glFrustum(), but how do I convert the gluPerspective parameters into that box? Thanks, Jason
Advertisement
Firstly, gluPerspective() is not a GLUT call, it is a glu call.
There is a difference.

However, if you really want to eliminate the need for that .dll (don''t see why, but if you do...)
Then take a look at the Quake 1 source code.
I am not sure of the *exact* implementation, but there is a function in there called MyGluPerspective (oh, how original Carmack is...). That should give you some idea.

Alternatively, get the source for OpenGL (I think it''s available somewhere).

Yes, it does use a call to glFrustrum.

-Mezz

This topic is closed to new replies.

Advertisement