Thanks for the reply Alex. I tried those changes (I think I've tried just about every pixel/internal format that I could think of) and the behavior of my program hasn't changed unfortunately.
apecoraro wrote: > I think the internal format of your osg::Image should be set to GL_RGBA8 not > GL_RGBA, which is a pixel format not an internal format. I find the OpenGL > 2.1 documentation very confusing on the use of internal format and pixel > format, but I think the 3.3 and 4.2 documentation is much easier to > understand. So check it out to verify what I'm saying. > > http://www.opengl.org/sdk/docs/ > > Also, insetad of setting the osg::Texture2D internal format to GL_RGBA you > should set its internal format mode to osg::Texture::USE_IMAGE_DATA_FORMAT > (actually that is the default, but when you call setInternalFormat it changes > the mode to osg::Texture::USE_USER_DEFINED_FORMAT). So I think just removing > the call to setInternalFormat on the texture will suffice. > > Change this: > > Code: > > image->setImage(width, height, 1 ,GL_RGBA,GL_RGBA,GL_UNSIGNED_BYTE, (unsigned > char*)data,osg::Image::NO_DELETE); > > > > > to this: > > Code: > > image->setImage(width, height, 1 ,GL_RGBA8,GL_RGBA,GL_UNSIGNED_BYTE, > (unsigned char*)data,osg::Image::NO_DELETE); > > > > > and this: > > Code: > > lutTexture->setInternalFormat(GL_RGBA); > > > > > to this: > > Code: > > lutTexture->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT); > > > > > Alex ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45543#45543 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org