[vtk-developers] passing vertex attributes to custom shader

Brad Hollister behollis at sci.utah.edu
Fri Mar 4 19:47:44 EST 2016


Hi,

I've been using vtkOpenGLPolyDataMapper() to set custom vertex / 
fragment shaders. I'd also like to provide user-defined vertex 
attributes accessible in the shader code. I assumed from the 
documentation that MapDataArrayToVertexAttributes() is the proper way 
to do this.

However, I get the ERROR: vtkOpenGLPolyDataMapper (0x2872160): Not 
implemented at this level...

There doesn't appear to be a derived class of vtkOpenGLPolyDataMapper 
available for my needs (which is that I'm specifying polygons via a 
vtkPolyData object).

Is it possible to pass vertex attributes and custom uniforms using 
vtkOpenGLPolyDataMapper? Is there a different way from the one I've 
been trying that makes this possible?

Regards,
Brad


More information about the vtk-developers mailing list