Question about BozoShader example

The VTK BozoShader example, https://examples.vtk.org/site/Cxx/Shaders/BozoShader, is another truly excellent example, and I am studying it with great interest. I would like to add one line

actor->GetProperty()->EdgeVisibilityOn();

but this results in errors such as

ERR| vtkOpenGLPolyDataMapper (0x3a85730): Could not set shader program

Any advice on how I can switch on EdgeVisibility? Rather than just adding the one line I mentioned above, should I create a new actor using the same PolyData, and have just the edges visible for it?

Hello,

It’s likely EdgeVisibilityOn() sets its own shader, hence the error (my two cents on this). So, you likely need to add edge visibility to the shaders of the BozoShader example. Please, take a look at this Shader-Based Wireframe Drawing (cgg-journal.com) This is old, but there is a straightforward shader code in the bottom of the page.

I hope this helps,

PC

1 Like