Render frustum and local coordinate system
Hi, I am new in programming with openGL, and how a question:
I am doing camera calibration now, and have rendered 12 cameras on my screen. Let's talk only about one. I need to draw it's frustum, and local coordinate system, but don't know how.
I will be very thankful if you can help me.
Look at the docs for glFrustum() and/or glOrtho. That tells you the corners of that frustum (call it frustum B) in that frustum's eye space. You can draw the sided or edges using that. See these good reference pages by Song Ho Ahn:
* OpenGL Transformation
* OpenGL Projection Matrix
Before you draw it though, you need to have that space active. If the frustum your using for your currently rendered view is frustum A, put frustum A's VIEWING transform on the MODELVIEW stack. Then add on the "inverse" VIEWING transform for frustum B. Then draw your frustum B sides/edges in frustum B's EYE-SPACE.
Last edited by Dark Photon; 10-29-2012 at 12:32 PM.
Thank you for quick answer, I will look through it, and if you don't mind, I will ask some questions personally, if I have them.
Originally Posted by Dark Photon
Thank you for your quick reply. I will look through that links, and if you don't mind I will ask questions personally if I have them.