Displaying 2D interface elements in a 3D game

Moderator
Posts: 102
Joined: 2003.07
Post: #1
I was just wondering what the best way to do this would be (push the projection matrix and use glOrtho() or some other way) I've seen it vaguely explained elsewhere but nobody got really specific. Using glOrtho() and pushing the matrix seems like the best way to go, but I don't know how you would switch between the two while drawing (glOrtho and gluPerspective), thanks for the help as always Wink

-CarbonX
Quote this message in a reply
Member
Posts: 233
Joined: 2003.05
Post: #2
I'm sure someone else can give you more detailed info if you need it, but basically, you are right.

For each visual update (every frame) draw all your perspective stuff first, then push that projection matrix and switch to glOrtho() and draw there, then pop, flush, repeat. Wink

"Pay no attention to that man behind the curtain." - Wizard of Oz
Quote this message in a reply
Moderator
Posts: 102
Joined: 2003.07
Post: #3
cool, thanks aaron.

-CarbonX
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Another beginner's question about displaying an animated object superlemonster 2 4,868 Jan 28, 2011 08:03 AM
Last Post: OptimisticMonkey
  How do I place all of my UI elements to be subviews of another view/window? xenocide 2 2,793 Feb 1, 2009 08:32 PM
Last Post: xenocide
  Simple OpenGL 2d test - nothing displaying SaxMan 8 6,550 Jan 19, 2009 12:04 AM
Last Post: TythosEternal
  Displaying image with OpenGL and DevIL in C? leRiCl 13 9,384 Jan 23, 2007 01:25 PM
Last Post: djork
  drawing or displaying vertex normal shru_ani 3 3,610 Oct 29, 2006 06:04 AM
Last Post: shru_ani