OSG Project Lead
Joined: 18 Mar 2009
|Posted: Wed Nov 16, 2016 9:54 am Post subject:
Shader Subroutine StateAttribute
I'm just looking through my pending osg-submissions and see that this
submission thread hasn't been resolved yet. One development on the
OSG side that may influence how you tackle this functionality is now
part of an experimental shader_pipeline branch of the OSG.
The shader_pipeline branch wraps new functionality for automatically
mapping fixed function state to shaders. To support this I've
refactored osg::Uniform so there is now an osg::UniformBase class with
a virtual apply() method that allows one to subclass from
osg::UniformBase and provide your own custom implementation. The way
I'm using it to utilize a TemplateUniform class that is then used to
provide Vec3Uniform, MatrixfUniformm etc. which make it lighter weight
to set/get properties rather was possible with the old osg::Uniform.
I don't know if this helps with SubroutineUniform but thought I'd
mention this new functionality as it it does provide more flexibility.
Post generated by Mail2Forum