Re: [osg-users] Taking screenshots using OSG 2.2

2007-11-19 Thread Robert Osfield
Hi Edu, OpenGL calls including glReadPixels are all relative to 0,0 placed at the lower left of the window, not 0,0 of the whole screen. By control the window rectangle is relative to the whole screen. Your glReadPixels should use the same values as the Camera's Viewport. Robert. On Nov 19,

Re: [osg-users] Taking screenshots using OSG 2.2

2007-11-16 Thread Schmidt, Richard, SDGE1
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eduardo Gutiérrez Sanmartín Sent: Friday, November 16, 2007 1:47 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Taking screenshots using OSG 2.2 Hello, While using OSG version

Re: [osg-users] Taking screenshots using OSG 2.2

2007-11-16 Thread Robert Osfield
Hi Edurado, The osgViewer::Viewer can will run multi-threaded by default in you have enough CPU cores available, and can open up multiple windows in you have multiple screens, both these issues mean that the thread that runs the main frame loop will not always have a valid graphics context

[osg-users] Taking screenshots using OSG 2.2

2007-11-16 Thread Eduardo Gutiérrez Sanmartín
Hello, While using OSG version 1.20, I was taking screenshots with the following code: while( !viewer.done() ) { viewer.frame(); // Here I get x, y, width and height. osg::Image *image = new osg::Image; image-readPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE);

[osg-users] Taking screenshots using OSG 2.2

2007-11-16 Thread Eduardo Gutiérrez Sanmartín
Thanks Richard, but I put viewer.setThreadingModel( osgViewer::ViewerBase::SingleThreaded ); and the capture is black again. I'm using Windows XP in a Pentium IV with a GeForce 6600. Another idea? Edu ___ osg-users mailing list