diff options
| author | raysan5 <[email protected]> | 2018-05-20 00:41:12 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2018-05-20 00:41:12 +0200 |
| commit | 3b70b66a089ed48b99305ce058a4bbde4a0bc3b4 (patch) | |
| tree | 702ba9c414fe6dd5465c93c16582584b57bb9511 | |
| parent | 24adca4ad054196a144eca8629e090ee10e413c5 (diff) | |
| download | raylib-3b70b66a089ed48b99305ce058a4bbde4a0bc3b4.tar.gz raylib-3b70b66a089ed48b99305ce058a4bbde4a0bc3b4.zip | |
Love OpenGL gotchas... make my life more enjoyable!
| -rw-r--r-- | src/rlgl.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1456,7 +1456,11 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi } else if (format == UNCOMPRESSED_GRAY_ALPHA) { + #if defined(GRAPHICS_API_OPENGL_21) + GLint swizzleMask[] = { GL_RED, GL_RED, GL_RED, GL_ALPHA }; + #elif defined(GRAPHICS_API_OPENGL_33) GLint swizzleMask[] = { GL_RED, GL_RED, GL_RED, GL_GREEN }; + #endif glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask); } #endif |
