Hi Hartwig, If you set a format that isn't supported by the OpenGL driver and you get an error then so be it. Fixing the code that sets up the image with a valid texture format is what should be done. Trying to catch and correct for a problem in user application set of OSG data is rather pushing what the OSG should and can be expected to do. This is particularly the case when what formats that might be supported that can be driver dependent.
Robert. On Sun, Mar 14, 2010 at 12:21 PM, Hartwig Wiesmann <hartwig.wiesm...@wanadoo.nl> wrote: > Hi, > > assume you create a picture using GL_BGRA format using > osg::Image::allocateImage(int s,int t,int r,GLenum format,GLenum type, int > packing) or you set the format with osg::Image::setInternalTextureFormat. > Both methods do not check if the internal texture format is valid. > > Calling osg::Texture::computeInternalFormatWithImage then results in a valid > texture format because this function also does not check if the texture > format is valid. > > I am willing to provide a patch but I would like to have an input where I > should patch the source code. I prefer to do it in > osg::Texture::computeInternalFormatWithImage. > Next question: assume the format is wrong which format should be taken? > > Hartwig > > > > Thank you! > > Cheers, > Hartwig > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=25628#25628 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org