Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/framework/graphics/texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down