Hi Johannes,

On 02/17/2010 04:36 AM, Johannes Brunen wrote:
> Hello Gerrit,
>
> I have observed a (little) problem with the SimpleMaterial class. As it is
> kind of a ChunkMaterial, I did expect that it would play nicely with my
> MaterialChunkOverrideGroup class. But that is unfortunately not the case. A
> SimpleMaterial does not override any materials in the subtree. This is
> because the SimpleMaterial's chunk list is empty(?) and the properties are
> added directly to the State object. What is the reason for implementing it
> in such a way? In order to avoid this problem I have replaced my
> SimpleMaterials by properly set up ChunkMaterials. However, I'm puzzled...

Well, The chunk list in the SM is primarily to make it easy for people to add 
things to the SM, but internally (and that is true for all Materials), the 
internal State is used to switch between OpenGL modes. The chunk list was 
mainly 
convenience to avoid having to a lot of different Material subclasses, but it 
was never the primary holder of information.

The main reason is that most materials were expected to create their states 
internally (by creating the appropriate chunks like shaders etc) to abstract 
higher-level shading methods. For those materials you don't want the user to 
mess with (or even care about) the actual chunks created. We don't have a lot 
of 
those yet, but conceptually IMHO it still makes sense.

Yours

        Dirk

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to