Fixed black screen on some GLES 2.0 devices.
It affects only GLES 2.0. The GLES >= 3.0 and OpenGL allow sized internal formats.
This commit is contained in:
parent
8462c552d1
commit
f13f69851f
@ -222,6 +222,14 @@ void STKTexture::reload(bool no_upload, uint8_t* preload_data,
|
||||
unsigned int internal_format = m_single_channel ? GL_R8 : isSrgb() ?
|
||||
GL_SRGB8_ALPHA8 : GL_RGBA8;
|
||||
|
||||
// GLES 2.0 specs doesn't allow GL_RGBA8 internal format
|
||||
#if defined(USE_GLES2)
|
||||
if (!CVS->isGLSL())
|
||||
{
|
||||
internal_format = GL_RGBA;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(USE_GLES2)
|
||||
if (isMeshTexture() && CVS->isTextureCompressionEnabled())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user