Browse Source

Fix for some driver bug on OSX.
For some reason, it reports it has the GL_ATI_draw_buffers extension even when no ATI card is in use,
resulting in an 'unrecognized ATI_draw_buffers hint' error from cgc.

rdb 16 years ago
parent
commit
98902127b1
1 changed files with 7 additions and 2 deletions
  1. 7 2
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 7 - 2
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -832,13 +832,18 @@ reset() {
     _glBindProgram = (PFNGLBINDPROGRAMARBPROC)
       get_extension_func(GLPREFIX_QUOTED, "BindProgramARB");
     // Bug workaround for radeons.
+    // For some reason, OSX reports to have this extension too,
+    // even when there's no ATI card, resulting in cgc not being
+    // able to find the hint. So, I've disabled the hack there.
+#ifndef IS_OSX
     if (_shader_caps._active_fprofile == CG_PROFILE_ARBFP1) {
       if (has_extension("GL_ATI_draw_buffers")) {
         _shader_caps._bug_list.insert(Shader::SBUG_ati_draw_buffers);
       }
-    }    
+    }
+#endif // IS_OSX
   }
-#endif
+#endif // HAVE_CG
 
 #ifdef OPENGLES_2
   // In OpenGL ES 2.x, FBO's are supported in the core.