- Fixed texture rendering issues in OpenGL ES drivers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5217 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
3fbea082cc
commit
e6fe1abc16
|
@ -2668,15 +2668,16 @@ COGLES2Driver::~COGLES2Driver()
|
|||
pixelType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case ECF_A8R8G8B8:
|
||||
internalFormat = GL_RGBA;
|
||||
if (queryOpenGLFeature(COGLES2ExtensionHandler::IRR_IMG_texture_format_BGRA8888) ||
|
||||
queryOpenGLFeature(COGLES2ExtensionHandler::IRR_EXT_texture_format_BGRA8888) ||
|
||||
queryOpenGLFeature(COGLES2ExtensionHandler::IRR_APPLE_texture_format_BGRA8888))
|
||||
{
|
||||
internalFormat = GL_BGRA;
|
||||
pixelFormat = GL_BGRA;
|
||||
}
|
||||
else
|
||||
{
|
||||
internalFormat = GL_RGBA;
|
||||
pixelFormat = GL_RGBA;
|
||||
*converter = CColorConverter::convert_A8R8G8B8toA8B8G8R8;
|
||||
}
|
||||
|
|
|
@ -3044,15 +3044,16 @@ void COGLES1Driver::getColorFormatParameters(ECOLOR_FORMAT format, GLint& intern
|
|||
pixelType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case ECF_A8R8G8B8:
|
||||
internalFormat = GL_RGBA;
|
||||
if (queryOpenGLFeature(COGLES1ExtensionHandler::IRR_IMG_texture_format_BGRA8888) ||
|
||||
queryOpenGLFeature(COGLES1ExtensionHandler::IRR_EXT_texture_format_BGRA8888) ||
|
||||
queryOpenGLFeature(COGLES1ExtensionHandler::IRR_APPLE_texture_format_BGRA8888))
|
||||
{
|
||||
internalFormat = GL_BGRA;
|
||||
pixelFormat = GL_BGRA;
|
||||
}
|
||||
else
|
||||
{
|
||||
internalFormat = GL_RGBA;
|
||||
pixelFormat = GL_RGBA;
|
||||
*converter = CColorConverter::convert_A8R8G8B8toA8B8G8R8;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue