|
|
@ -126,7 +126,13 @@ namespace
|
|
|
|
|
|
|
|
|
|
|
|
glViewport(0, 0, width, height);
|
|
|
|
glViewport(0, 0, width, height);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__APPLE__)
|
|
|
|
|
|
|
|
// FIXME: why are the extra flips needed on Mac? glReadPixels bug?
|
|
|
|
|
|
|
|
osg::ref_ptr<osg::Geometry> geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,1,0), osg::Vec3(2,0,0), osg::Vec3(0,-2,0));
|
|
|
|
|
|
|
|
#else
|
|
|
|
osg::ref_ptr<osg::Geometry> geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,-1,0), osg::Vec3(2,0,0), osg::Vec3(0,2,0));
|
|
|
|
osg::ref_ptr<osg::Geometry> geom = osg::createTexturedQuadGeometry(osg::Vec3(-1,-1,0), osg::Vec3(2,0,0), osg::Vec3(0,2,0));
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
geom->drawImplementation(renderInfo);
|
|
|
|
geom->drawImplementation(renderInfo);
|
|
|
|
|
|
|
|
|
|
|
|
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, resultImage->data());
|
|
|
|
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, resultImage->data());
|
|
|
|