Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Render frustum and local coordinate system

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19

    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.

    Best regards,
    Mike.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    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 11:32 AM.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    Quote Originally Posted by Dark Photon View Post
    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.
    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.

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •