Hi Jesper, You can't do OpenGL rendering without a graphics context, that graphics context has to be supplied by either a window or a pbuffer. In your case you'll be wanting to use a pbuffer. The osgscreencapture uses a pbuffer to enable the capture a screen shot without a window appearing.
Robert. On Mon, Jun 22, 2009 at 12:07 PM, Jesper D. Thomsen<[email protected]> wrote: > Hi all (and thank you for your help in the past). > > > > I work on an application were I’m using OSG to display viewports of a model. > I have a function of my application where I use PBO’s to take high-res > screenshots of the displayed model. However, I now also need to be able to > take screenshots from a script-defined camera (a camera in my application, > not an OSG-camera) without having a viewport of the model open. That is, I > need to be able to render to texture (In my case PBO) even if I’m not using > OSG to drive a viewport. But, how do I make an osg viewer without a handle > to a window which it should use to display the model? I would also like to > use this to enable offscreen rendering in a console application, where I > need to output images of a running analysis, which only uses the command > line (on a Windows system). > > > > I have looked at the osgprerender and other examples, but they all create a > viewer with some window rendering context. > > > > Any hints and help would be much appreciated. > > > > Regards, > > > > Jesper D. Thomsen > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

