Commit a729fe77 authored by Robert Menzel's avatar Robert Menzel

sopport more formats when downloading images from GL

parent c5a33101
......@@ -103,7 +103,7 @@ SharedTextureData Texture::getImageData(GLint _lod, GLenum _type) const
if (mFormat == GL_RGB) channels = 3; // TODO: check the other channel types
GLubyte* imageData = new GLubyte[width * height * getGLTypeSize(_type) * channels];
glGetTexImage(mTarget, _lod, GL_RGB, _type, (GLvoid*)imageData);
glGetTexImage(mTarget, _lod, mFormat, _type, (GLvoid*)imageData);
// revert to the previously bound texture
glBindTexture(mTarget, prevTexture);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment