[vtk-developers] Recent patch broke OpenGL 2.0 on OS X

David Gobbi dgobbi at atamai.com
Wed Nov 1 10:32:06 EST 2006


Hi Ken,

Your recent change to vtkOpenGLExtensionManager.cxx has broken the 
vtkOpenGLTextureMapper3D on the Mac.

The OpenGL driver on my Mac returns "1.5 ATI-1.4.18" as the version but 
has GL_VERSION_2_0 as an extension, so the new extension reporting 
method that you added doesn't recognize that my Mac supports 2.0.  The 
situation gets even more complicated:  from my experimentation, I found 
that I have to load "GL_VERSION_1_3" as an extension before 
"GL_VERSION_2_0" can be loaded.

The following code (at around line 248) works on the Mac by attempting 
loading each version extension, and then doing your additional checks:


    int tryMajor, tryMinor;
    sscanf(ve.c_str(), "GL_VERSION_%d_%d", &tryMajor, &tryMinor);
    if ( (vtkgl::LoadExtension(ve.c_str(), this) != 0)
        || (driverMajor > tryMajor)
        || ((driverMajor == tryMajor) && (driverMinor >= tryMinor)) )
      {
      // OpenGL version supported.
      extensions_string += " ";
      extensions_string += ve;
      }


Do you see any problems if the above code is committed?

Thanks,

 - David






More information about the vtk-developers mailing list