]> git.tdb.fi Git - libs/gl.git/commitdiff
Tweak extension behavior on Radeon
authorMikko Rasa <tdb@tdb.fi>
Fri, 17 Oct 2014 18:44:01 +0000 (21:44 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 17 Oct 2014 18:44:01 +0000 (21:44 +0300)
source/extension.cpp

index fdbefb5336407e402ba0985985804ba4d527c241..efa4b1a29c9fab1d820b5749217d02515fdf25e6 100644 (file)
@@ -80,11 +80,18 @@ bool is_supported(const string &ext)
 
                string renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
                if(renderer.find("Radeon")!=string::npos)
+               {
                        /* Radeon doesn't process NV_primitive_restart correctly and treats
                        the restart index as a normal element if the indices are stored in a
                        buffer. */
                        extensions.erase("GL_NV_primitive_restart");
 
+                       /* AMD's uniform buffer objects only work with the core version of
+                       shaders. */
+                       if(!(get_gl_version()>=Version(2, 0)))
+                               extensions.erase("GL_ARB_uniform_buffer_object");
+               }
+
                if(const char *disable_ptr = getenv("MSPGL_DISABLE_EXTENSIONS"))
                {
                        vector<string> disable = split(disable_ptr);