aboutsummaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2014-07-23 19:50:06 +0200
committerraysan5 <raysan5@gmail.com>2014-07-23 19:50:06 +0200
commit56a79797505eb50386b587465707248c091400df (patch)
treec3a4cff9bbd16b81486ada4bf269166abbd11bb7 /src/textures.c
parentecb3c47704ccaa349ee4824b019181d700919582 (diff)
downloadraylib-56a79797505eb50386b587465707248c091400df.tar.gz
raylib-56a79797505eb50386b587465707248c091400df.zip
Corrected bugs...
Set default raylib to use OpenGL 1.1 (compatibility issues on ATI cards)
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/textures.c b/src/textures.c
index 4bd6378d..2bbf8e61 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -35,6 +35,11 @@
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
+// Security check in case no USE_OPENGL_* defined
+#if !defined(USE_OPENGL_11) && !defined(USE_OPENGL_33) && !defined(USE_OPENGL_ES2)
+ #define USE_OPENGL_11
+#endif
+
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
@@ -297,7 +302,7 @@ Texture2D LoadTexture(const char *fileName)
}
else
{
-#ifdef USE_OPENGL_33
+#if defined(USE_OPENGL_33) || defined(USE_OPENGL_ES2)
texture.id = rlglLoadCompressedTexture(image.data, image.width, image.height, image.mipmaps, image.compFormat);
#endif
}