> It seems like this should be fairly straightforward
> to implement, by making use of OpenGL's ability
> to push and pop various parts of its state.
> Whenever you encounter an object with a material,
> push the current state of the relevant OpenGL
> variables, set them up for the new material,
> render all the sub-objects, then pop the previous
> material state.

Hum... it's a bit more complex in Soya, because the order in which the objects 
are rendered may not follow the scene tree.

However, i think the new deforming system (again :-) can be easily extended to 
do that ; something like a MaterialSwitcherDeform. Instead of just 
"one-material inheritance", i'm thinking rather to a dictionary mapping old 
materials to the new ones, which would allow to change several materials.

Basically, the deforming system create internally a "ghost" shape/model, which 
share some attributes with the non-deformed shape/model. E.g. for mesh 
deformation, it shares the materials list but not the geometry, but the 
contrary should be doable: sharing the geometry and display list, but not the 
material list.

Jiba

_______________________________________________
Soya-user mailing list
Soya-user@gna.org
https://mail.gna.org/listinfo/soya-user

Reply via email to