Thanks Robert for the suggestion. I implemented the feature based on osgscreencapture.cpp for the case "--pbuffer-only". However the code still has two problems:
1) I get the following warning PixelBufferX11::init(), pbuffer created with different size then requsted Requested size (800,600) Pbuffer size (0,0) Pixel buffer has been created successfully. If I let it pass the video creation works fine, but I get weird drawings on my screen (on the whole desktop, independent of any window). If I add a check for the pixel buffer size after creation, well it is always empty. Without the pbuffer feature the application works fine. 2) Independent of the previous issue, if I run the application in a console (out of X) I get the following error Error: Unable to open display ":0.0". GraphicsWindow has not been created successfully. Error: Unable to open display ":0.0". std::exception was raised: ColladaRenderer::ColladaRenderer failed to create the pixel buffer so it seems that the viewer still tries to create the GraphicsWindow. Where in the code can I check if the viewer will try to create a GraphicsWindow ? What do you think I am doing wrong ? Regards, rodrigob. On Mon, Jul 25, 2011 at 1:17 PM, Robert Osfield wrote: > HI Rodrigo, > > The way to create an offscreen window is to use a Pbuffer graphics > context, see the osgscreencapture.cpp example for code paths that > creates pbuffers. > > Robert. > > On Mon, Jul 25, 2011 at 12:11 PM, Rodrigo Benenson > <rodrigo.benen...@gmail.com> wrote: >> Hello OpenSceneGraph community ! >> >> I am creating my first application with openscenegraph, the aim is to >> generate an animation and record it into a video file. >> Right now I have a running program that uses osg and gstreamer to >> render the animation and record it, everything works fine. >> >> However, there is an issue: I currently use the osgViewer::Viewer >> class, and when using it an X window appear (showing the animation). >> >> I would like my application to be a console application only (no >> graphical output). >> >> Do you have suggestions on how to do this ? >> I would assume that there should be something like "class >> ConsoleViewer : public osgViewer::BaseViewer", but maybe I am looking >> at this the wrong way ? >> Your help is much welcome. >> >> Thanks for the answers ! >> Regards, >> rodrigob. >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > You received this message because you are subscribed to the Google Groups > "OpenSceneGraph Users" group. > To post to this group, send email to osg-us...@googlegroups.com. > To unsubscribe from this group, send email to > osg-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/osg-users?hl=en. > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org