I'm trying to add a shader to a vtkActor into my application. I have different vtkActors and they must have different shaders each one.
I tried with the vtkShader2, vtkShaderProgram2 and vtkOpenGLProperty to set the program loaded with the shader to the actor, but it didn't work (vtk told me in a warning window that it has 4 shaders in the actor, the default shaders and mine).
Someone knows the right way to do it?
The solution finally appeared in vtk mailing list after months of waiting! I didn't test it myself, but user @carlinhos says it works. He resumes the steps:
EDIT: Is @carlinhos you? I am feeding you your own answer? :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With