From Tugkan Calapoglu, "we started to have problems with textures after a recent svn update. I
was able to follow the problem until following addition to Texture.cpp: // GLES doesn't cope with internal formats of 1,2,3 and 4 so map them to the appropriate equivilants. if (_internalFormat==1) _internalFormat = GL_ALPHA; if (_internalFormat==2) _internalFormat = GL_LUMINANCE_ALPHA; if (_internalFormat==3) _internalFormat = GL_RGB; if (_internalFormat==4) _internalFormat = GL_RGBA; The problem is that internal format "1" corresponds to GL_LUMINANCE, not GL_ALPHA. I double checked this from the Red Book. Fixed version is attached to the email."
This commit is contained in:
@@ -1402,7 +1402,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
|
||||
_internalFormat = internalFormat;
|
||||
|
||||
// GLES doesn't cope with internal formats of 1,2,3 and 4 so map them to the appropriate equivilants.
|
||||
if (_internalFormat==1) _internalFormat = GL_ALPHA;
|
||||
if (_internalFormat==1) _internalFormat = GL_LUMINANCE;
|
||||
if (_internalFormat==2) _internalFormat = GL_LUMINANCE_ALPHA;
|
||||
if (_internalFormat==3) _internalFormat = GL_RGB;
|
||||
if (_internalFormat==4) _internalFormat = GL_RGBA;
|
||||
|
||||
Reference in New Issue
Block a user