Archived

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

Geomipmapping...

This topic is 5584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I''m about to implement geomipmapping into my engine, and there is one thing that I don''t know. How would I find the "Top coordinate of the near-clipping plane"? Finding the near clipping plane I can do, but surely that depends on the modelview matrix aswell, and this is supposed to be precalculated... Hmm... Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
Somewhere in your app you either make a call to gluPerspective or glfrustrum. the top-coordinate is one of the params to the glFrustrum call. If you use gluPerspective you can calculate it this way (this is from the mesa source btw) :

t = zNear * tan(fovy * PI/360.0f);

zNear and fovy are the params you pass to gluPerspective.

(I'm assuming you're using opengl, direct3d probably has something similar)

[edited by - George2 on September 2, 2002 2:24:50 PM]

Share this post


Link to post
Share on other sites