Advertisement Jump to content
Sign in to follow this  
Phy

OpenGL Near/Far Clip

This topic is 4954 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

Is there a way to get what the near and far clip are set to directly from OpenGL?

Share this post


Link to post
Share on other sites
Advertisement
If you get the projection matrix, you can solve for the near and far planes.

This page has the OpenGL perspective projection matrix.

Share this post


Link to post
Share on other sites
I'm probally beter off just storing what I use on initialization then, you think?

Share this post


Link to post
Share on other sites
Quote:
Original post by Phy
I'm probally beter off just storing what I use on initialization then, you think?

Yes. Getting data from opengl is never a good idea if you can get it from somewhere else. (Specially if you pass it to opengl before.)

Share this post


Link to post
Share on other sites
promit is correct with the glgetfloat projection matrix u could do a bit of math to work it out (theres is no getget near/far plane command in case thats what u thought)
but then again as others have said youve already told gl what the near/far planes distances are (with gluPerspespective/glFrustum()) + u wanna ask it for them again, do u have a short memory :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!