Dirk Reiners wrote:
        Hi Marcus,

On Sat, 2005-07-09 at 01:55 +0200, Marcus Lindblom wrote:

Hmm.. Does this mean that it is will not be possible to define a global state that is selectively overriden by chunks in MaterialGroups further down in the graph?

That is currently not possible, and this change wouldn't change that.
Right now MaterialGroups fully override the Material in the Nodes.
Changing that is a major change, as the State (vector of StateChunks)
used to render is stored in the Materials and not in the DrawTree, which
makes it more efficient but less flexible.

Understood. I just wanted to get my head around it. :) This would of course preclude the use of a 'default' material at the top node, but I suppose no-one uses that. Also, I was thinking a bit about possible future extensions, like merging State instances during draw, but that could perhaps be done by extending ChunkMaterial into a ChunkMergeMaterial which could implement a variety of combinating algorithms during render. I use a static version of this currently, manually adding missing chunks from some material to other materials in the graph (i.e. when applying shaders to VRML-objects, and similar.=

This change would just change the priority. Right now the closest
MaterialGroup to the Node has Priority, afterwards the farthest would.

Ok.

It's quite easy to write a graphop/traversefunctor which replaces/removes all materials in a subgraph. This is what I use to modify the material of VRML-loaded graphs

Yup, it is. If you need to do it multiple times per frame (like the
things Terry mentioned) it would be too expensive, though.

True.

I'm going to change it.

Sure. Sorry for causing some ruckus. I just got a bit worried about to the long-term effects (w.r.t. future developments of OpenSG) by this change.

/Marcus


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to