Hi Andreas,
>
> something like this should to the trick ...
> mat is the material from a MaterialGroup oder Geometry node.
>
> ChunkMaterialPtr cmat = ChunkMaterialPtr::dcast(mat);
> if(cmat != NullFC)
> {
> MaterialChunkPtr matc = cmat->find(MaterialChunk::getClassType());
> if(matc != NullFC)
> {
> beginEditCP(matc);
> matc->setEmission(Color4f(1.0f, 0.0f, 0.0f, 1.0f));
> endEditCP(matc);
> }
> }
>
yes, this way it's working. Thanks.
I also managed the problem with material sharing by using deep-clone.
However, it still happens, that material changes only come to (visible)
effect after I have transformed geometry. I tried adding
cmat->rebuildState() to the above code but that didn't help. What would
I have to do?
Matthias
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users