Hi Mike Thanks for the explanation. In my app I want to apply a program to a dynamic set of objects. During runtime I want to be able to change the shader associated with the program. The shaders are completely different, so using Uniforms to control the behaviour is not an option. When I was figuring out how to do this I came up with the following options:
1) Remove the current shader of the program and add the new shader 2) Create a new program for each shader. CON: This would require that I keep track of all the statesets the program was applied to and modify them with the new program. 3) Load the source of the new shader into the existing shader. CON: This would cause the shader to be recompiled every time it is activated. All 3 options are totally acceptable for me, I just went with option 1 because it seemed like the easiest and most efficient solution. I'm thinking I'll go with option 3 now, because I still won't have to keep track of the applied statesets and recompiling the shader is not that big a deal, especially since the shaders are not changing very often. Thanks again for looking into this. -Farshid _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
