Displaying 2D interface elements in a 3D game
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
-CarbonX
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.
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.
"Pay no attention to that man behind the curtain." - Wizard of Oz
cool, thanks aaron.
-CarbonX
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Another beginner's question about displaying an animated object | superlemonster | 2 | 4,066 |
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,388 |
Feb 1, 2009 08:32 PM Last Post: xenocide |
|
| Simple OpenGL 2d test - nothing displaying | SaxMan | 8 | 5,408 |
Jan 19, 2009 12:04 AM Last Post: TythosEternal |
|
| Displaying image with OpenGL and DevIL in C? | leRiCl | 13 | 8,229 |
Jan 23, 2007 01:25 PM Last Post: djork |
|
| drawing or displaying vertex normal | shru_ani | 3 | 3,006 |
Oct 29, 2006 06:04 AM Last Post: shru_ani |
|

