Am 17.02.2015 17:52, schrieb Robert Osfield:
Hi Sebastian,
On 17 February 2015 at 16:33, Sebastian Messerschmidt
<[email protected]
<mailto:[email protected]>> wrote:
It seems to act differently :-(.
It could be you've hit upon and bug, or perhaps just a
mis-understanding of how things are meant to behave. I'd suspect the
first possibility given how new the functionality is.
Indeed i did :-)
The problem is within the StateSet::merge function. The case in which i
had the problem used StateSet::merge instead of directly setting the state.
Reinjecting the defines after merging solves the problem and after
looking into the merge code, I suspect the error here.
Sorry for not directly providing a patch, but I'm at my laptop, so
turn-around times with compiling and testing.
I'll provide some minimal example for the problem as soon as possible.
Cheers
Sebastian
Any chance you could reproduce the problem by modifying the
osgshadercomposition example in svn/trunk?
The difference my case is the fact, that the element is added at
some point in time. I expect this is after all previous used
combinations have been built.
Any idea where I could set a breakpoint to see if a new
combination is created when I add the new define?
The work for tracking defines happens in
osg::State::pushDefineList/popDefineList and selecting program and
shader objects happen in Program header & .cpp and Shader header &
.cpp respectively.
In osg::State you'll find the following methods that can be called to
check the current state of defines, you'd need to call this between
the push/pop of the DefineList.
std::string getDefineString(const osg::ShaderDefines&
shaderDefines);
bool supportsShaderRequirements(const osg::ShaderDefines&
shaderRequirements);
bool supportsShaderRequirement(const std::string&
shaderRequirement);
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org