Is there a way to get the number of materials from a mesh?

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
n00bc0de
Posts: 147
Joined: Tue Oct 04, 2022 1:21 am

Is there a way to get the number of materials from a mesh?

Post by n00bc0de »

I am trying to get the number of materials on a mesh before creating a scene node from it. How would I do this?
CuteAlien
Admin
Posts: 10057
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Is there a way to get the number of materials from a mesh?

Post by CuteAlien »

Materials for a mesh are per meshbuffer. So number of meshbuffers is identical with the number of materials.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
n00bc0de
Posts: 147
Joined: Tue Oct 04, 2022 1:21 am

Re: Is there a way to get the number of materials from a mesh?

Post by n00bc0de »

Thanks for the help. I actually tried to respond yesterday but I kept getting an error when I tried to log in.
CuteAlien
Admin
Posts: 10057
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Is there a way to get the number of materials from a mesh?

Post by CuteAlien »

Yeah, the sourceforge people are trying to improve the server and it already got a lot better again than a week ago. But it seems to be a bit of a constant fight. Probably AI companies browsing the web like crazy not making it better.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply