Added remapping of internal texture formats to GL_RGBA etc when just the number of components is used i.e.
1 -> GL_ALPHA, 2 -> GL_LUMINANCE_ALPHA 3 -> GL_RGB 4 -> GL_RGBA
This commit is contained in:
@@ -1397,6 +1397,13 @@ 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==2) _internalFormat = GL_LUMINANCE_ALPHA;
|
||||
if (_internalFormat==3) _internalFormat = GL_RGB;
|
||||
if (_internalFormat==4) _internalFormat = GL_RGBA;
|
||||
|
||||
computeInternalFormatType();
|
||||
|
||||
//osg::notify(osg::NOTICE)<<"Internal format="<<std::hex<<internalFormat<<std::dec<<std::endl;
|
||||
|
||||
Reference in New Issue
Block a user