how to display 2d scene on top of 3d scene???

I wanna display some lines & text(2d graphics) on top of 3d opengl scene. I wanna see the 3d scene at the back so the lines(or 2d graphics i wanna draw) must have transparent background. If u need some more info let me know.
Thanks in advance take care

What about trying this one ?

or this:

Masking is a way to put HeadUpDisplay in your OpenGL app/game.

To draw in 2D use the Ortho Mode
described at NeHe in Lesson 21

Well with some other things too.

Hope this helps,


[This message has been edited by stryx (edited 03-24-2002).]

Set your camera up for 3d, draw 3d scene
Set your camera up for 2d, draw 2d scene

and repeat…

Pls write to me the full info abt drawing 2d graphics on top of 3d scene as an overlay. I wanna makre an air craft hud view.
Thanks very much

What dont you understand?

If you know how to setup and draw a 3d view, and you know how to setup and draw a 2d view, then all you have to do is draw the 2d stuff after the 3d stuff (with depth test disabled).

There is nothing to it, just use the code above.