[osg-users] 2D drawing over a 3D drawing
robert.osfield at gmail.com
Mon Mar 23 04:08:40 PDT 2009
Please have a look at the osghud example.
2009/3/23 Gianluca Natale <gianluca.natale at adstorino.it>
> Hi All.
> I need to draw a 2D drawing (a single wireframe rectangle) over a 3D
> drawing of a scene. Basically I need it to show a window selection in the
> In OpenGL, I would set a perspective projection like glFrustum(…), draw the
> scene, then set a glOrtho2D(…), and draw the rectangle. Finally I would call
> a swap buffers.
> How can I do it with OSG?
> I mean, in OSG the projection matrix is associated with a camera. So,
> should I use two cameras, one for the 3D scene, the other just for the 2D
> In camera::frame there is the swap of the back and front buffers. But I
> would like to swap those buffers just at the end, after drawing everything.
> So, should I call the drawing of the 3D camera without swapping, then the
> drawing of the 2D camera with swapping at the end?
> I read in the quick start guide of OSG of the thread for draw traversal.
> Since I call camera::Frame twice, does OSG create 2 different threads?
> Is there any conflict between those threads, since they draw with different
> projection matrices?
> Thanks in advance
> Gianluca Natale
> osg-users mailing list
> osg-users at lists.openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users