Add a user data member to the SMaterial structure
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Add a user data member to the SMaterial structure
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Re: Add a user data member to the SMaterial structure
I need it today!
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: Add a user data member to the SMaterial structure
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..."
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Re: Add a user data member to the SMaterial structure
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Re: Add a user data member to the SMaterial structure
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.3DModelerMan wrote:Why? What do the devs have against one extra member in the SMaterial struct?
Working on game: Marrbles (Currently stopped).
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Re: Add a user data member to the SMaterial structure
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- 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
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.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Re: Add a user data member to the SMaterial structure
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar