]> git.tdb.fi Git - libs/gl.git/blobdiff - source/extension.cpp
Return false from is_supported for disabled extensions
[libs/gl.git] / source / extension.cpp
index b65172fc691dc4b71e8ba2d4c5dc6e03eac9bfa2..692037c3b174583bf7f35ea2c1afae98413140e9 100644 (file)
 #include "extension.h"
 #include "gl.h"
 
+#ifndef GL_VERSION_3_0
+#define GL_NUM_EXTENSIONS 0x821D
+#endif
+
+#ifndef GL_VERSION_3_2
+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+#endif
+
 using namespace std;
 
 namespace Msp {
@@ -70,6 +79,9 @@ Require::Require(const Extension &ext)
 
 bool is_supported(const string &ext)
 {
+       if(is_disabled(ext))
+               return false;
+
        static set<string> extensions;
        static bool init_done = false;
 
@@ -229,7 +241,7 @@ const Version &get_glsl_version()
 
 ExtFunc *get_proc_address(const string &name)
 {
-#if defined(WIN32)
+#if defined(_WIN32)
        return reinterpret_cast<ExtFunc *>(wglGetProcAddress(name.c_str()));
 #elif defined(__APPLE__)
        (void)name;