]> git.tdb.fi Git - libs/gl.git/commitdiff
Disable NV_primitive_restart on Radeon cards because it's buggy
authorMikko Rasa <tdb@tdb.fi>
Thu, 28 Mar 2013 18:44:21 +0000 (20:44 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 28 Mar 2013 18:44:21 +0000 (20:44 +0200)
source/extension.cpp

index 6ca4f08ce61728da8a1a9c994880be0d85810a97..d4acedaf1213ac55817b6d30715db1b7364c95d1 100644 (file)
@@ -53,6 +53,13 @@ bool is_supported(const string &ext)
                        extensions.insert(exts.begin(), exts.end());
                }
 
+               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");
+
                init_done = true;
        }