[Ves] Questions on ViewerApp shader initialization

David Thompson david.thompson at kitware.com
Fri Apr 19 00:28:02 EDT 2013


Hi Aashish,

>> ...
>> 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.
>> 
> - I would probably vote for clone method on vesShaderProgram or if we want to provide an API at the APP level it would be something like this->newShader("id/name")

I agree that clone() would be simpler (in that it would not require as many changes to the app base class).

I think it is important to provide something at the app level for the simple case (a default shader used by all actors in the absence anything else). But it should be easy to create new ones; maybe the application doesn't even need to manage them?

	David


More information about the Ves mailing list