• Advertisement


This topic is now archived and is closed to further replies.

glOrtho() ???

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

I''m on the stage of implementing a Menu system in my "Sparetime-project". I''ve planned to have a "Title-screen" menu where the user can choose settings and new game, Thus, simple 2D works perfectly! Is there any way to just swap to Ortho mode during a function and display a set of bitmaps? Some src is appreciated!

Share this post

Link to post
Share on other sites
You can always write directly to the OGL buffer, but it''s slow as hell.... only good way is to use textured squares.....


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states )

Share this post

Link to post
Share on other sites
I think you should do something like:

// Make sure we''re working with the projection matrix.

// Save the current (presumeably perspective) matrix.

// Set up the orthogonal projection.

... /* Do menu stuff */
// Go back to the previous matrix.


You may have to do something to the modelview matrix, as well. I''m not sure what, since I haven''t tried this yet.

According to the OpenGL standard, you can only be sure of having 2 entries on the projection matrix stack. That means that you couldn''t recursively use glPushMatrix each time you drew a submenu, for example. You''d have to keep track of whether or not you were in a submenu, and not push/pop if it was.


Share this post

Link to post
Share on other sites

  • Advertisement