Archived

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

dragon376

Drawing transparent 2D image over 3D

Recommended Posts

dragon376    140
What function do we use in OpenGL to draw a 2D image such as speed indicator over the 3D animated world? Is it real 2D or do we draw a blended object in front of the camera?

Share this post


Link to post
Share on other sites
invective    118
I would just push the projection matrix, set up an ortho2D projection matrix (gluOrtho2D), enable alpha blending, disable depth testing, and draw your guage with 2D screen coordinates (then undo all those state changes and pop the view matrix).

Share this post


Link to post
Share on other sites