Browse Source

Corrected bug

pull/66/head
Ray 9 years ago
parent
commit
a6f5a0339a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/rlgl.c

+ 1
- 1
src/rlgl.c View File

@ -2105,7 +2105,7 @@ void *rlglReadTexturePixels(Texture2D texture)
// NOTE: GL_LUMINANCE and GL_LUMINANCE_ALPHA are removed since OpenGL 3.1 // NOTE: GL_LUMINANCE and GL_LUMINANCE_ALPHA are removed since OpenGL 3.1
// Must be replaced by GL_RED and GL_RG on Core OpenGL 3.3 // Must be replaced by GL_RED and GL_RG on Core OpenGL 3.3
switch (format)
switch (texture.format)
{ {
#if defined(GRAPHICS_API_OPENGL_11) #if defined(GRAPHICS_API_OPENGL_11)
case UNCOMPRESSED_GRAYSCALE: pixels = (unsigned char *)malloc(size); glFormat = GL_LUMINANCE; glType = GL_UNSIGNED_BYTE; break; // 8 bit per pixel (no alpha) case UNCOMPRESSED_GRAYSCALE: pixels = (unsigned char *)malloc(size); glFormat = GL_LUMINANCE; glType = GL_UNSIGNED_BYTE; break; // 8 bit per pixel (no alpha)

Loading…
Cancel
Save