aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorFilippos Karapetis2010-12-01 14:54:13 +0000
committerFilippos Karapetis2010-12-01 14:54:13 +0000
commit1a2b512ff0965442f99662ff276cc0fb6f5aa611 (patch)
tree70747aa97049264e7d4d78158111237fdfd1d905 /backends/graphics/opengl
parent26f27d9983b93a6c8389605f0d59271b1d0f597f (diff)
downloadscummvm-rg350-1a2b512ff0965442f99662ff276cc0fb6f5aa611.tar.gz
scummvm-rg350-1a2b512ff0965442f99662ff276cc0fb6f5aa611.tar.bz2
scummvm-rg350-1a2b512ff0965442f99662ff276cc0fb6f5aa611.zip
BACKENDS: Use SDL_opengl.h instead of the nonstandard glext.h to ensure OpenGL 1.2 compatibility in Windows systems
svn-id: r54700
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/gltexture.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index 944cdf221c..c5a06bbc54 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -36,11 +36,16 @@
#include <GLES/gl.h>
#elif defined(MACOSX)
#include <OpenGL/gl.h>
-#elif defined(WIN32)
-#include <GL/gl.h>
-#include <GL/glext.h>
#else
+
#include <GL/gl.h>
+#if defined(SDL_BACKEND) && !defined(GL_VERSION_1_2)
+// The OpenGL libraries included in Windows are for OpenGL 1.1. Use the SDL
+// OpenGL header file to enable the additional needed defines for OpenGL 1.2
+// here.
+#include <SDL_opengl.h>
+#endif
+
#endif
#include "graphics/surface.h"