aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-21 04:45:52 +0100
committerJohannes Schickel2016-03-16 20:29:25 +0100
commit1802c939a1a46d89df05cae5e30e2014646e30fa (patch)
treed508e36de6342c1a12e5c603c85bc4d60310e4ae /backends/graphics/opengl
parentb7e64c6eebd08f0f95c270a2f1f3fc78a12ce764 (diff)
downloadscummvm-rg350-1802c939a1a46d89df05cae5e30e2014646e30fa.tar.gz
scummvm-rg350-1802c939a1a46d89df05cae5e30e2014646e30fa.tar.bz2
scummvm-rg350-1802c939a1a46d89df05cae5e30e2014646e30fa.zip
OPENGL: Slight simplifcation for opengl-func.h usage.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/opengl-func.h10
-rw-r--r--backends/graphics/opengl/opengl-sys.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/backends/graphics/opengl/opengl-func.h b/backends/graphics/opengl/opengl-func.h
index d022d00b30..f870214754 100644
--- a/backends/graphics/opengl/opengl-func.h
+++ b/backends/graphics/opengl/opengl-func.h
@@ -63,6 +63,11 @@
* GL_EXT_FUNC_DEF: Define an OpenGL (ES) extension function.
*/
+#if !defined(GL_EXT_FUNC_DEF)
+#define GL_EXT_FUNC_DEF(ret, name, param) GL_FUNC_DEF(ret, name, param)
+#define DEFINED_GL_EXT_FUNC_DEF
+#endif
+
GL_FUNC_DEF(void, glEnable, (GLenum cap));
GL_FUNC_DEF(void, glDisable, (GLenum cap));
GL_FUNC_DEF(void, glClear, (GLbitfield mask));
@@ -137,3 +142,8 @@ GL_EXT_FUNC_DEF(void, glVertexAttribPointerARB, (GLuint index, GLint size, GLenu
GL_EXT_FUNC_DEF(void, glVertexAttrib4fARB, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w));
GL_EXT_FUNC_DEF(void, glEnableVertexAttribArrayARB, (GLuint index));
#endif
+
+#ifdef DEFINED_GL_EXT_FUNC_DEF
+#undef DEFINED_GL_EXT_FUNC_DEF
+#undef GL_EXT_FUNC_DEF
+#endif
diff --git a/backends/graphics/opengl/opengl-sys.h b/backends/graphics/opengl/opengl-sys.h
index dabd6adaa7..6da1850cba 100644
--- a/backends/graphics/opengl/opengl-sys.h
+++ b/backends/graphics/opengl/opengl-sys.h
@@ -98,9 +98,7 @@ struct Context {
#endif
#define GL_FUNC_DEF(ret, name, param) ret (GL_CALL_CONV *name)param
-#define GL_EXT_FUNC_DEF GL_FUNC_DEF
#include "backends/graphics/opengl/opengl-func.h"
-#undef GL_EXT_FUNC_DEF
#undef GL_FUNC_DEF
};