Hi Trajce.
Thank you very much for your answer. Unfortunately this isn't what I'm looking
for. The prerender example does pretty much the same thing as the distortion
example : it creates a window with a view and a scene graph and does render to
texture within this graph. I, on the other hand, must do render to texture
within a graph that is not linked to any window (offscreen).
Here is a use case example. I'm making an airplane simulation. I have a window
with a view displaying the outside world as seen from the cockpit. Now, when
the user press a button, I want to make a photo of what is below the plane.
This photo must not be displayed on any window at the moment it is taken (not
yet), it must be rendered offscreen and stored for later use.
What I tried to do is creating a pbuffer (using the createGraphicsContext()
function and setting pbuffer = true in the traits), then assign a view to this
pbuffer and use it for my offscreen rendering. It didn't work. It seems it
isn't possible to create both a window and a pbuffer within the same
application. If I create a pbuffer first and a window later I get an error in
wglMakeCurrent() saying the pixel format is invalid. If I create the window
first and then the pbuffer then I get no error but the window doesn't show up.
Regards
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62372#62372
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org