X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fextension.cpp;h=a095986123dd535d192881c2870649ae8e936e43;hp=b65172fc691dc4b71e8ba2d4c5dc6e03eac9bfa2;hb=99d25b5ef615a23ef63645fea87596b3384b5ede;hpb=e79c72cf90dacaa47d82d65d3e6c4252f055f454 diff --git a/source/extension.cpp b/source/extension.cpp index b65172fc..a0959861 100644 --- a/source/extension.cpp +++ b/source/extension.cpp @@ -12,6 +12,15 @@ #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 extensions; static bool init_done = false; @@ -130,6 +142,9 @@ bool is_disabled(const string &ext) buffer. */ disabled_exts.insert("GL_NV_primitive_restart"); + // The core primitive restart feature does not work either. + disabled_exts.insert("GL_MSP_primitive_restart"); + /* AMD's uniform buffer objects only work with the core version of shaders. */ if(get_gl_version()=ver)) + if(force_ver=ver)) + if(force_ver(wglGetProcAddress(name.c_str())); #elif defined(__APPLE__) (void)name;