Added feedback of pixel format chosen for read back
This commit is contained in:
parent
8ed9b303f1
commit
bb1f6ff7c1
@ -67,8 +67,16 @@ class WindowCaptureCallback : public osg::Camera::DrawCallback
|
|||||||
{
|
{
|
||||||
if (gc->getTraits())
|
if (gc->getTraits())
|
||||||
{
|
{
|
||||||
if (gc->getTraits()->alpha) _pixelFormat = GL_BGRA;
|
if (gc->getTraits()->alpha)
|
||||||
else _pixelFormat = GL_BGR;
|
{
|
||||||
|
osg::notify(osg::NOTICE)<<"Select GL_BGRA read back format"<<std::endl;
|
||||||
|
_pixelFormat = GL_BGRA;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
osg::notify(osg::NOTICE)<<"Select GL_BGR read back format"<<std::endl;
|
||||||
|
_pixelFormat = GL_BGR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getSize(gc, _width, _height);
|
getSize(gc, _width, _height);
|
||||||
@ -94,7 +102,7 @@ class WindowCaptureCallback : public osg::Camera::DrawCallback
|
|||||||
_pboBuffer.push_back(0);
|
_pboBuffer.push_back(0);
|
||||||
break;
|
break;
|
||||||
case(TRIPLE_PBO):
|
case(TRIPLE_PBO):
|
||||||
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
|
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
|
||||||
_pboBuffer.push_back(0);
|
_pboBuffer.push_back(0);
|
||||||
_pboBuffer.push_back(0);
|
_pboBuffer.push_back(0);
|
||||||
_pboBuffer.push_back(0);
|
_pboBuffer.push_back(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user