Working with materials, basic programming question.
Posted: Thu Apr 26, 2007 11:55 pm
Hello.
I Want to get the material of a node and manipulate it, but not with the reference returned with getMaterial, I think you will understand better with some sample code:
I thought that modifying pointerMaterial I could modify the node material also but it's not working. I know it is something with pointers and indirections but It's my weak point, so any help is apreciated, thank you.
I Want to get the material of a node and manipulate it, but not with the reference returned with getMaterial, I think you will understand better with some sample code:
Code: Select all
SMaterial *pointerMaterial;
SMaterial &nodeMaterial = node->getMaterial(0);
pointerMaterial = nodeMaterial;
//Now I want to modify the material but using pointerMaterial
pointerMaterial->Texture1 = ...