Hi Mathias, Thanks for the patch. Could you send the whole modified file.
Also could you detail what platform/hardware/drivers that you found the problem and how I could reproduce the problem. I ask this as others, including myself, have used the same Image function without problems. Cheers, Robert. On 23 May 2013 11:27, Mathias Garbe <[email protected]> wrote: > Hey there. > > I just fixed a bug in osg::Image::readImageFromCurrentTexture. The problem > is that glGetBooleanvis called on GL_TEXTURE_BINDING_* (which is an int and > will get converted to bool) instead of GL_TEXTURE_*. > > Here is the patch: > > > --- src/osg/Image.cpp Thu May 23 10:09:06 2013 > +++ src/osg/Image.cpp Thu May 23 10:10:21 2013 > @@ -968,14 +968,14 @@ > > GLboolean binding1D = GL_FALSE, binding2D = GL_FALSE, binding3D = > GL_FALSE, binding2DArray = GL_FALSE, bindingCubeMap = GL_FALSE; > > - glGetBooleanv(GL_TEXTURE_BINDING_1D, &binding1D); > - glGetBooleanv(GL_TEXTURE_BINDING_2D, &binding2D); > - glGetBooleanv(GL_TEXTURE_BINDING_3D, &binding3D); > - glGetBooleanv(GL_TEXTURE_BINDING_CUBE_MAP, &bindingCubeMap); > + glGetBooleanv(GL_TEXTURE_1D, &binding1D); > + glGetBooleanv(GL_TEXTURE_2D, &binding2D); > + glGetBooleanv(GL_TEXTURE_3D, &binding3D); > + glGetBooleanv(GL_TEXTURE_CUBE_MAP, &bindingCubeMap); > > if (extensions2DArray->isTexture2DArraySupported()) > { > - glGetBooleanv(GL_TEXTURE_BINDING_2D_ARRAY_EXT, &binding2DArray); > + glGetBooleanv(GL_TEXTURE_2D_ARRAY_EXT, &binding2DArray); > } > > GLenum textureMode = binding1D ? GL_TEXTURE_1D : binding2D ? > GL_TEXTURE_2D : binding3D ? GL_TEXTURE_3D : binding2DArray ? > GL_TEXTURE_2D_ARRAY_EXT : 0; > > > This is my first patch for osg, let me know if I did anything wrong. > > -- Mathias > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
