Hi Mathias, On 11/9/06, Mathias Froehlich <[EMAIL PROTECTED]> wrote:
Good morning Robert,
Good morning, yep we are both in Europe, so morning it is for both of us :)
Ok, found it :) I sucessfully use that otimizer and had a quick look into the flags and did not remeber something like 'balance' or 'quad tree' or whatever. As german - I expect you have already identified that - I had not connected spatialize with a quadtree ...
SPATIALIZE_GROUPS is the one, it takes any flat groups and converts then into a spatially balanced quad tree. Some databases come in from modelling packages with 10,000's of nodes all in a single group. Creating a quad tree from them makes a massive difference to cull performance.
Aehm, I came across something in osg::Material. The osg::Material::apply routine is the only place where glEnable is called outside the codepath used for the osg::StateSet::setMode(). I wonder if this is a source for inconsistencies in the osg::State in the sense that osg::State believes GL_COLOR_MATERIAL is not enabled but the osg::Material::apply just did enable that?
osg::Material is a bit of an oddity in that its the only place, as you've spotted, where it does its own mode setting. Ideally osg::Material should be split out into two classes, and the mode setting removed from it. osg::Material is a very old class now, predating most of the other osg::StateAttributes, its served us well though - the mode oddity you've spotted is not something that users ordinarily hit upon. Actually I think you are the first person to spot this and mention it publically :-) The way to use osg::Material is just as a black box and leave it to control GL_COLOR_MATERIAL, rather than doing the setMode's yourself. In the longer term I need to do a refactor on osg::Material to factor out the colour material side of things, but this would break compatibility so it'd be something we need to be careful about. Robert. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/