[Ves] Questions on ViewerApp shader initialization

David Thompson david.thompson at kitware.com
Thu Apr 18 23:30:22 EDT 2013


Hi all,

I have some questions and/or suggestions for the way vesKiwiViewerApp handles shaders.

1. It is great to have a variety of shaders available, but I don't understand why the app makes it difficult to have multiple instances of the same shader with different uniforms. This is especially important for the clip shader as it would be nice to have several actors with different clip planes. It would be nice to just call this->newClipShader() on the app and get a new shader out. Or have a "clone()" method on vesShaderProgram.

2. Is there a reason for having shader uniforms collected in vesKiwiBaseApp::vesInternal::Uniforms? They appear never to be retrieved anywhere in vesKiwiBaseApp.cpp and -- because the vesInternal class is private and defined only in that file -- are not accessible elsewhere. I ask because if the Uniforms vector was removed, the shader creation functions in the viewer could be static methods that returned shader programs. Which would be nice.

	Thanks,
	David


More information about the Ves mailing list