Hey all
I was looking to change some of the settings of SMaterial on one node but it appears you can't do that. It seems like the only access you get to the SMaterial of that node is through the functions setMaterialFlag(), but what if you use settings like changing the ambiant colour, the emissive colour etc. Is this impossible? If it is, how can I give access to the SMaterial struct for my scene nodes?
Accessing SMaterial
I believe you would do something like this:
I haven't put it to use, but it should work in theory. I would assume that any call to getMaterial() should allow you to access the SMaterial struct as that's what setMaterialFlag() and setMaterialType() do to access the struct in its own class.
Code: Select all
MeshNode->getMaterial(0).AmbientColor = video::SColor(0,0,0,0);
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
- E.W. Dijkstra