[vtk-developers] VTK 6 - GLSL Shaders

eternallite cdavid.tran at gmail.com
Sat Jun 29 01:51:15 EDT 2013


Hello,

I built the most recent stable release of VTK 6.0 to try and migrate my
current 5.10.1 project and
I ran into the same thing others have experienced which is that the ::New()
method returns NULL
since the Object factory hasn't initialized/registered the platform-specific
classes so I followed the
advice suggested and added the autoinit #defines into my files:



(I excluded the freetype font modules) But anyway, as soon as I create a
vtkSphereSource
and used actor->GetProperty()->LoadMaterial() to load an .xml file with one
vertex shader, I got this error:



The shaders should be supported since I was able to successfully load the
.xml shaders using version 5.10.1 but not able to get them working on VTK 6.

Anyway, here's the code snippet in VTK's vtkShaderProgram.cxx around line
114:


It seems that the vtkInstantiator::CreateInstance is trying to create an
instance of vtkGLSLShaderProgram
then it's casted to a vtkShaderProgram but of course, either way, the method
returns NULL since
the GLSL shaders not supported line is only called if retval is NULL.

Thanks for your help in advance!



--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-GLSL-Shaders-tp5721679.html
Sent from the VTK - Dev mailing list archive at Nabble.com.



More information about the vtk-developers mailing list