Hello Johannes,

On 08/20/2013 06:20 AM, Johannes Brunen wrote:
> today I have tried to make use of the MultiCore core. Below you can see
> the modified createScenegraph function from the 07materials tutorial.
[SNIP]
> This does not work, i.e. the material is not respected. So either my
> expectation about the MultiCore is wrong or a subtle error is at work.
> So, how do I correctly use the MultiCore core?

this is caused by an "interesting" combination of factors:
- Group::renderEnter() returns status Action::Skip if all children are 
culled (this saves calling the leave function Group::renderLeave).
- MaterialGroup calls it's base class's (Group) renderEnter and if that 
returns Action::Skip does not bother setting the material - in the 
normally correct assumption that there are no children that would use it 
anyways.
- your MultiCore node is a leaf and as such the MaterialGroup thinks it 
does not need to set the material since there are no children - except 
of course that in a MultiCore all but the last core do have "children".

The easy fix is to not do the optimisation in 
MaterialGroup::renderEnter, that will fix the bug at the cost of more 
nodes being cull tested.

While looking for other Group derived cores that might suffer from the 
same problem, I also found what looks like a bug in 
ChunkOverrideGroup::renderEnter: This function installs the override 
chunks and then does a return Group::renderEnter() - meaning if all 
children are culled the overrides are installed, but never removed 
because the corresponding renderLeave() is never done :(

Any preferences, other ideas how to fix this?

        Cheers,
                Carsten

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to