Engine Changes question

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
isfk
Posts: 24
Joined: Tue Jul 17, 2007 8:12 pm

Engine Changes question

Post by isfk »

Just curious why the materials where changed into different classes. Was this a performance issue design, or what?

Thanks.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

why the materials where changed into different classes.
I don't understand this question. Could you try to be a bit more descriptive?
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I think this is what he means:
changes.txt wrote: Changes in version 1.4 (... 2007)

- Major API change: All material properties which are available per texture layer (curently texture, texture matrix, texture filters, and texture wrap mode) are separated into a new struct SMaterialLayer. You can access them via the array TextureLayer[] in SMaterial. The texture matrix methods in SMaterial are still alive, and also textures can be accessed via methods in SMaterial now. But still, many places in user code need some update (usually changing material.Textures to material.TextureLayer.Texture etc.)
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
isfk
Posts: 24
Joined: Tue Jul 17, 2007 8:12 pm

Post by isfk »

From what I understand the new beta splits the materials structure in to different classes. Just wondering why that is, or am I misstaken?
isfk
Posts: 24
Joined: Tue Jul 17, 2007 8:12 pm

Post by isfk »

M.G. Yes, wondering why that is.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You'd have to ask hybrid for a definite answer, but I'm pretty sure my guess is correct. The change was likely made to simplify the SMaterial implementation a bit, and to address some seperation of concerns type issues. SMaterial was getting complicated trying to manage the texture matrices, and it is a logical split to seperate the layers out into their own type.

If you use the public methods of SMaterial, instead of accessing the public members directly, you should not be impacted by the change at all.

Travis
isfk
Posts: 24
Joined: Tue Jul 17, 2007 8:12 pm

Post by isfk »

Awsome, thank you for your reply.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Eh, yes, Vitek is right. There are still some things which will have to be added to one of the structs in the future, so just one struct would grow into a complex swamp. Moreover, there had been so many arrays which were all defining just one property of a larger thing - the layer material properties.
Post Reply