Re: [osg-users] [OpenGL ES] Bug in loading textures
Hi Hartwig, On 10 October 2011 10:56, Robert Osfield robert.osfi...@gmail.com wrote: Once you are happy with your solution could please post the full source code files that you've changed to osg-submissions. Could you send me the complete files that you have modified so I can review them? I don't attempt to merge sutff by copying pasting from emails as it's far too prone to errors. Thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [OpenGL ES] Bug in loading textures
Hi Hartwig, Once you are happy with your solution could please post the full source code files that you've changed to osg-submissions. Thanks, Robert. On Sat, Oct 8, 2011 at 11:50 AM, Hartwig Wiesmann hartwig.wiesm...@wanadoo.nl wrote: Hi, this is my patch for Texture::computeInternalFormatWithImage(...) replacing lines 1435 - 1442: Code: // GLES doesn't cope with some internal OpenGL formats so map them to the appropriate equivalents. #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) switch (internalFormat) { case 1: _internalFormat = GL_LUMINANCE; break; case 2: _internalFormat = GL_LUMINANCE_ALPHA; break; case 3: case GL_RGB8_OES: _internalFormat = GL_RGB; break; case 4: case GL_RGBA8_OES: _internalFormat = GL_RGBA; break; default: _internalFormat = internalFormat; } OSG_NOTICEInternal format corrected for OpenGL ES from 0x std::hexinternalFormat to 0x std::hex_internalFormatstd::endl; #else _internalFormat = internalFormat; #endif Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43268#43268 ___ 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
Re: [osg-users] [OpenGL ES] Bug in loading textures
Hi, just found out that I can also patch Texture::computeInternalFormatWithImage(const osg::Image) const so that it returns valid OpenGL ES formats (in case OpenGL ES is used). Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43267#43267 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [OpenGL ES] Bug in loading textures
Hi, this is my patch for Texture::computeInternalFormatWithImage(...) replacing lines 1435 - 1442: Code: // GLES doesn't cope with some internal OpenGL formats so map them to the appropriate equivalents. #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) switch (internalFormat) { case 1: _internalFormat = GL_LUMINANCE; break; case 2: _internalFormat = GL_LUMINANCE_ALPHA; break; case 3: case GL_RGB8_OES: _internalFormat = GL_RGB; break; case 4: case GL_RGBA8_OES: _internalFormat = GL_RGBA; break; default: _internalFormat = internalFormat; } OSG_NOTICEInternal format corrected for OpenGL ES from 0x std::hexinternalFormat to 0x std::hex_internalFormatstd::endl; #else _internalFormat = internalFormat; #endif Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43268#43268 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org