Greetings, everyone. Is there any way to get OSG into a state where it renders everything to an offscreen FBO? In addition to this, I would need to suppress any sort of window creation or rendering to a back buffer.
That's my basic question, but here's a little background just in case. What I am basically trying to do is create an OSG-based C++ library that will: a) Create a render context without launching a window. b) Draw a scene graph to an off-screen buffer. c) Read the pixel data back into system memory. d) Marshal that data into WPF code. e) Paint a WPF control with this image. I know that this is bound to be slow, but frame rate is not important for this application. I already have d & e working, using a set of dummy pixel data defined in the C++ library. I just need to figure out how to get OSG to render to an off-screen buffer without launching a window, and then how to get it to do some sort of glReadPixels-type thing in order to get the result into system memory. So far, I've just been using osgViewer::Viewer for everything, but I'm guessing that option is out and that I'll have to do something more manual. Thanks! Frank P.S. I am aware that there are other ways of getting OSG to draw to a WPF control. For instance, I tried using a WinFormsHost in order to stick a WinForms panel into my application. This gives me an HWND that I can pass to OSG so that it will draw directly to the control. I have tried this approach, however in doing so, I have run into some so-called "airspace" issues that are tricky to solve. I have tried a couple of the approaches that I found on the web for working around this, and none of them are optimal. So, I am giving this method a try, wherein I draw to an off-screen FBO and then read the pixel data back, and pass it to WPF. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42347#42347 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

