Yeah, I'm afraid you may have to do that.

Once the double-buffer has been swapped to the screen, you can't draw on it
anymore.

Some implementations may allow you to hint that you want a COPY swap, which
leaves the buffer still intact in the back buffer after swap, so you could
draw on it, but I don't think you can guarantee it.

You probably want to RTT render the main scene to a texture, then to
display it, just rasterize it onto a fullscreen quad each time. This makes
it efficient to draw _any_ UI elements on top of it, without having to XOR
(XOR is hard to see on mid-grey colors anyway) because you're actually
clearing and re-blitting the texture on each update redraw.


On Tue, Sep 24, 2013 at 6:26 PM, Andrew Cunningham <andr...@mac.com> wrote:

> I am using a double-buffered window as per the OSG MFC example.
> traits->doubleBuffer = true;  The MFC example shows a nice overlay HUD of
> rendering statistics.
>
> This just seems such a typical 3D UI interaction - to show a rectangular
> area on the screen under mouse control for selection or zooming that it
> surprises me there is not a canned solution. I suppose I could grab the
> pixel buffer and make that a static background while I draw the rectangle.
> It is crucial the full 3D scene be not continuously redrawn while drawing
> this zoom box.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=56474#56474
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to