Hi Alex, I guess this will be something that is rather driver dependant - and why I had spotted this issue with my own usage. Could you modified Image.cpp to get things working for and post the full modified file to osg-submissions.
Thanks, Robert. On 15 February 2012 16:35, Pecoraro, Alexander N <[email protected]> wrote: > I was trying to use osg::Image::readImageFromCurrentTexture() to read back a > texture from the GPU. The glGetTexImage() call was failing because it was > using an invalid pixel format. The pixel format that it uses comes from > calling osg::Image::computePixelFormat() with the internal format of the > texture as input. In this case my texture’s internal format was GL_RGBA8, > which computePixelFormat() incorrectly returns GL_RGBA8. It should return > GL_RGBA. I also tried GL_RGBA16 and had the same experience. Probably just > need to add: > > > > case GL_RGBA8: > > case GL_RGBA16: > > return GL_RGBA; > > > > to the swit ch statement in computePixelFormat() to fix the problem. > > > > Alex > > > _______________________________________________ > 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

