Materials? SMaterial?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
The_Irrlicht_noob
Posts: 13
Joined: Wed Sep 28, 2005 5:15 pm
Location: sweden

Materials? SMaterial?

Post by The_Irrlicht_noob »

I want all my models to use "setMaterialFlag( EMF_FOG_ENABLE, 1);" So I want to use that function in the "IVideoDriver" ... But it doesn't work... So I have maybe to use the "setMaterial" function (as "IVideoDriver" got) But I don't know how to make a SMaterial..
Help :?:
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

so set the fog to a node of the model not to every material
what is this thing...
The_Irrlicht_noob
Posts: 13
Joined: Wed Sep 28, 2005 5:15 pm
Location: sweden

Post by The_Irrlicht_noob »

Ok... But I want all objects to simulate fog... And I think there is a way: To use that "IVideoDriver" and set a material to it.
Anyone? Please help!
independentCreations
Posts: 24
Joined: Fri Oct 28, 2005 10:05 am
Location: Gold Coast, QLD, Australia

Post by independentCreations »

Could have an Object Manager that stores an array/vector/map what eva ... of pointers to your objects. It calls a function that steps through each object flagging the effect, such as fog.

Or you could try and edit the source so that you can call from IVideoDriver a function that links with you SceneManager and flags all SceneNodes, but thats gettin difficult...
"do it, do it now"
The_Irrlicht_noob
Posts: 13
Joined: Wed Sep 28, 2005 5:15 pm
Location: sweden

Post by The_Irrlicht_noob »

Yea, it must be like that. I was just looking for a faster/better solution.
Post Reply