Add a user data member to the SMaterial structure

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Add a user data member to the SMaterial structure

Post by 3DModelerMan »

I think that Irrlicht's material system needs some better user data handling. It would be nice if it had a member like: "void* UserData;" that could be set just like with Bullet's user data. Or maybe a pointer to an IAttributes object?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Add a user data member to the SMaterial structure

Post by mongoose7 »

I need it today!
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Add a user data member to the SMaterial structure

Post by randomMesh »

Will never happen (see the other 4375983457 threads about user data). Instead, use a irr::core::map or hack the source and recompile the engine.
"Whoops..."
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: Add a user data member to the SMaterial structure

Post by 3DModelerMan »

Why? What do the devs have against one extra member in the SMaterial struct?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Add a user data member to the SMaterial structure

Post by serengeor »

3DModelerMan wrote:Why? What do the devs have against one extra member in the SMaterial struct?
You could just add it yourself, unless you need to update irrlicht by svn often, but even then I think you could pull it off by writing automatic script or some tool that would patch the smaterial struct for you.
Working on game: Marrbles (Currently stopped).
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: Add a user data member to the SMaterial structure

Post by 3DModelerMan »

Oh yeah. An automatic patching script would work. I never thought of that.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Add a user data member to the SMaterial structure

Post by hybrid »

void* user data members are the least well designed concepts, and SMaterial is one fo the most size constrained structs in Irrlicht (just check the implementation, we work with bitfields etc). And we try to avoid void* members completely in the engine.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: Add a user data member to the SMaterial structure

Post by 3DModelerMan »

I guess I could just write a user data manager using a std::map instead.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Post Reply