[vtkusers] using openGL 4.1 on mac os X under vtk 5.10

Sean McBride sean at rogue-research.com
Wed Apr 1 12:26:52 EDT 2015


On Tue, 31 Mar 2015 23:57:34 +0000, eric lamar via vtkusers said:

>All:I am developing a VTK 5.10-based medical application under Mac OS X
>10.10.I am extending VTK with a volume rendering engine that needs
>opengl 3.1 (specifically, glRestartPrimitive). When I do a
>glGetString(GL_VERSION), the system reports "2.1 NVIDIA-10.0.43
>310.41.05f01". When I request OpenGL 3.2 (I've modified the routine
>"vtkCocoaRenderWindow::CreateGLContext" in vtkCocoaRenderWindow.mm; I've
>added "NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core" to the
>attributes list.), the system responds with "4.1 NVIDIA-10.0.43
>310.41.05f01".That is fine; however, in a small demo app that works fine
>under Opengl 2.1 but I get a blank screen under Opengl 4.1.

VTK 5.x uses old school OpenGL.  Your best bet would be to first update to VTK 6.2, which will require some code changes on your part:

<http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide>

Even then, 6.2's default OpenGL is also old school, but you can enable the experimental OpenGL2 support and repeat your test:

<http://www.kitware.com/source/home/post/144>

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the vtkusers mailing list