[osg-users] Possible bug in pragmatic shader composition and optimizers

Robert Osfield robert.osfield at gmail.com
Tue Jul 14 01:29:23 PDT 2015


Hi Sebastian,

On 14 July 2015 at 09:14, Sebastian Messerschmidt <
sebastian.messerschmidt at gmx.de> wrote:

> Me again,
>
> I've attached a minimal example which illustrates the problem.
> It seems the combination
> osgUtil::Optimizer::SHARE_DUPLICATE_STATE |
> osgUtil::Optimizer::STATIC_OBJECT_DETECTION
>
> causes the both geometries to be rendered as if the define was not set.
> If the optimizer is not run the geometries are rendered as expected.
>

Thanks for the example, haven't tested it yet as earlier this morning I
created my own example to reproduce the bug.

Since reproducing the bug I have tracked down the problem to the
osg::StateSet::compare() implementation that didn't have a code path for
comparing the StateSet::_defineList.  Adding a code path for the
_defineList solved the bug for my example - it just ran
osgUtil::Optimizer::optimize(..).

I have checked the bug fix into svn/trunk and the OSG-3.4 branch.  Could
you test this out and let me know if it works for you?

Cheers,
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150714/2824f66d/attachment-0002.htm>


More information about the osg-users mailing list