Results 1 to 3 of 3

Thread: Switching to and from orthogonal projection

  1. #1
    Guest

    Switching to and from orthogonal projection

    I'm currently working on an openGL project in which I have implemented a console...

    I use orthogonal projection when rendering the console so that i can accurately place text and draw the console on a per pixel basis, but I dont use orthog when rendering my game world. So each frame (if the console is up) I need to switch to orthogonal projection to render it then switch back to render the world, I'd like to know the quickest way of doing so.

    Currently I use quite a few lines of code to switch OUT of orthog (to 'perspective' projection?) because I set up the view area and fov all over again, which I'm sure is unnecessary.

    Thanks.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: Switching to and from orthogonal projection

    the usual strategy is to use glPushMatrix() and glPopMatrix to store the perspective projection while you render in ortho. At least thats what I usually do. I doubt however that the switch between ortho and perspective is likely to be a bottleneck in your program.

  3. #3
    Guest

    Re: Switching to and from orthogonal projection

    I think I tried push & pop matrix but something went all funny with the perspective mode, maybe I just need to experiment more

Similar Threads

  1. Fit orthogonal projection matrix around shadow casters (CSM)
    By imported_Silverlan in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 11-20-2014, 12:20 PM
  2. Replies: 1
    Last Post: 04-06-2009, 10:38 AM
  3. [Q] Perspective & Orthogonal projection at the same time?
    By Kyuman in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-20-2005, 04:56 AM
  4. 2d orthogonal projection problem.
    By amoskoh in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-02-2004, 06:13 PM
  5. Switching projection
    By in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 10-26-2003, 05:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean