diff --git a/src/framework/graphics/texture.cpp b/src/framework/graphics/texture.cpp index 93cd6701ce..9f740c8d6d 100644 --- a/src/framework/graphics/texture.cpp +++ b/src/framework/graphics/texture.cpp @@ -223,12 +223,15 @@ void Texture::setupPixels(const int level, const Size& size, const uint8_t* pixe ) const { GLenum format = 0; + GLenum internalFormat = GL_R8; switch (channels) { case 4: format = GL_RGBA; + internalFormat = GL_RGBA; break; case 3: format = GL_RGB; + internalFormat = GL_RGB; break; case 2: format = GL_LUMINANCE_ALPHA; @@ -238,8 +241,6 @@ void Texture::setupPixels(const int level, const Size& size, const uint8_t* pixe break; } - GLenum internalFormat = GL_RGBA; - #ifdef OPENGL_ES //TODO #else