View Full Version : 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 http://www.opengl.org/discussion_boards/ubb/smile.gif
03-24-2002, 04:46 AM
What about trying this one ?
or this: http://nehe.gamedev.net/tutorials/lesson20.asp
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).]
03-24-2002, 01:47 PM
Set your camera up for 3d, draw 3d scene
Set your camera up for 2d, draw 2d scene
03-26-2002, 02:55 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
03-26-2002, 03:13 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.