Commit 8ddc91c5 authored by Robert Menzel's avatar Robert Menzel
Browse files

added warning if another GL loader or header was included before our loaders are included

parent 1edb41a9
...@@ -174,8 +174,9 @@ ...@@ -174,8 +174,9 @@
#else #else
// use the internal loader: // use the internal loader:
#define ACGL_EXTENSION_LOADER_GLLOADGEN #define ACGL_EXTENSION_LOADER_GLLOADGEN
// prevent other GL headers from getting included and redefine GL: #if defined(__gl_h_) || defined(__GL_H__) || defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_ATI_h_) || defined(__gl3_h_)
#define __gl3_h_ #error ACGL/GL.hh has to be the first OpenGL related file to include!
#endif
// //
// Include the right header which has just what is needed to catch compatibility problems at compiletime. // Include the right header which has just what is needed to catch compatibility problems at compiletime.
...@@ -217,6 +218,8 @@ ...@@ -217,6 +218,8 @@
#include <ACGL/OpenGL/glloaders/gl_compatibility_42.hh> #include <ACGL/OpenGL/glloaders/gl_compatibility_42.hh>
#endif #endif
#endif // ACGL_OPENGL_PROFILE_CORE #endif // ACGL_OPENGL_PROFILE_CORE
// prevent other GL headers from getting included and redefine GL:
#define __gl3_h_
#endif // ACGL_USE_GLEW #endif // ACGL_USE_GLEW
#else #else
#define ACGL_USE_GLEW #define ACGL_USE_GLEW
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment