Hi Adrian,
I think it should. This is just a quick test if a program attribute is enabled. I haven't found a best solution for that, hence implemented it in this way. However I think the & operator is applied before == operator, which yields in the same operation as your first solution. It do just check if the ON attribute is present in the state attribute. However I agree, it is better to change that. I'll do this next. Cheers, art > Is the code doing what we want? > > // now apply all uniforms which are in the database > for (osg::StateSet::UniformList::const_iterator it = > mUniforms.begin(); > it != mUniforms.end(); it++) > { > if (it->second.second & > osg::StateAttribute::ON == > osg::StateAttribute::ON) > > lastAppliedProgram->apply(*(it->second.first)); > } > > we should use > if (* ( it->second.second & osg::StateAttribute::ON > )* == > osg::StateAttribute::ON) > > or > > if (it->second.second &* (osg::StateAttribute::ON == > osg::StateAttribute::ON)* ) > > or > if (it->second.second *&& > *osg::StateAttribute::ON == > osg::StateAttribute::ON ) > > > see @ > f:\dev\OpenSceneGraph\osgPPU\src\osgPPU\ShaderAttribute.cpp > at line 363 > > > -- > ******************************************** > Adrian Egli > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org