PDA

View Full Version : Mixing 2d and 3d



Mitikoro
05-30-2008, 01:04 PM
Hi. I'm writing a game in OpenGL. Everything is ok, but i need an HUD in 2d. I tried some solutions but i can't get the 2d and the 3d together. Thanks.

ZbuffeR
05-30-2008, 02:10 PM
draw the 3D as you do currently.
then before swapbuffers :
- reset projection matrix, and set it to glortho
- disable depth test
- draw your 2D hud

Mitikoro
05-31-2008, 02:01 AM
thanks
it worked