Stephan Huber wrote on Friday, September 08, 2006 12:06 PM:
> Hi Bryan,
> 
> Thrall, Bryan schrieb:
>> I finally got around to looking at this, but I'm having some trouble
>> creating a simple test case; I don't see how you can have two
>> Geometry objects with different textures (as Stephen describes) that
>> MergeGeometryVisitor will merge, because they will have different
>> StateSets so the LessGeometry comparator will see them as different
>> and they won't be put into the same DuplicateList.
> 
> 
>> Stephen, can you create a simple test case that demonstrates the
>> problem you're having?
> 
> After looking into my code I described my problem a little bit
> inaccurately. My setting is as follows: There is one geode part of the
> scenegraph with two geometry-drawables, both without a stateset. Later
> in the application, both geometries get a newly created stateset with
> different textures and a blending-animation starts.
> 
> I ran into the problem, that the two geometries got merged by the
> Optimizer, and my code holds a reference to a geometry, which is not
> part of the scenegraph anymore, so the animation did not work anymore.
> 
> What I want to do is to "mark" the geode/geometry, so the Optimizer
> can still do its work, but leaves this particular geode with its two
> geometries untouched. I thought this is why Object::Datavariance
> exists, but it seems, that every object in the scenegraph is DYNAMIC.
> 
> So there is no bug in the optimizer, but I have a small feature
> request to exclude certain nodes from being optimized.

Well, the bug is that you should be able to use
Optimizer::setPermissibleOptimizationsForObject() but can't because
MergeGeometryVisitor doesn't check that ;)

I have submitted a fix for that. In the mean time, you can use
setPermissibleOptimizationsForObject() to disable MERGE_GEOMETRY on the
Geode, as Robert suggested.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]

.

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to