- 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-e03cc46cb475
master
nadro 2015-12-14 22:51:01 +00:00
parent 3fbea082cc
commit e6fe1abc16
2 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}