Near/Far Clip
If you get the projection matrix, you can solve for the near and far planes.
This page has the OpenGL perspective projection matrix.
This page has the OpenGL perspective projection matrix.
I looked into it, but it seems it can't be done by using glGet...() according to this site
Maybe you can derive them from the projection matrix, but I have no idea how.
Maybe you can derive them from the projection matrix, but I have no idea how.
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.)
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 :)
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 :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement