Hi Aitor, I'm not the author of QGLWidget so will pass on the specifics on it's implementation. One thing you could try is getting the current Camera from the RenderInfo object and then access this Camera's Viewport to get the dimensions.
Robert. On 13 February 2013 13:40, Aitor Ardanza <[email protected]> wrote: > Hi, > > I'm trying to take a screenshot from osg render into qt windget. For this I > create a class inherit from osg::Camera::DrawCallback, so when the frame is > rendered the application call the virtual void operator () (osg::RenderInfo& > renderInfo) const function of that class. > > The problem comes when I take the size of the render from the graphic > contexts traits. These are not updated, even when the window and qglWidget > are resized. > > The render is made in other thread and I get that all worked well, but with a > wrong image size. > > Any suggestions to fix this? > > Thank you! > > Sorry for my English... > > Cheers, > Aitor > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=52633#52633 > > > > > > _______________________________________________ > 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

