Archived

This topic is now archived and is closed to further replies.

Ranger_One

gluPerspective implementation?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites