[osg-users] How to take a picture of my scene?

Carlos Sanches carlos at met.com.br
Tue Jul 15 09:23:28 PDT 2008


I continue to render a black screen :(
How do I have to use de postdrawcallback ?
I m using this code:

 bool myKeyboardEventHandler::handle(const osgGA::GUIEventAdapter&
ea,osgGA::GUIActionAdapter& aa)
 {
      switch(ea.getEventType())
       {
       case(osgGA::GUIEventAdapter::KEYDOWN):
          {
               switch(ea.getKey())
               {
                 case 'a':

                     image->readPixels(0,0,200,200,
GL_RGB,GL_UNSIGNED_BYTE);
                     osgDB::writeImageFile(*image,"capture.bmp");

                     return false;
                 break;

                 ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/f32894cd/attachment-0003.htm>


More information about the osg-users mailing list