[solved] what's the texture?

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
bruZard
Posts: 14
Joined: Thu Mar 19, 2009 9:21 am

[solved] what's the texture?

Post by bruZard »

Hi guys, please excuse my poor english.

My problem: I want to load a mesh in any format (.b3d, .3ds, .obj, whatever) and i do not know the filename of it's texture. Is there any option to load a model and then find out the texture(s) filename(s) ?
Last edited by bruZard on Thu Jun 09, 2016 7:13 am, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: what's the texture?

Post by CuteAlien »

Check the log-window - if it tries to load a texture there might be a message in there.

If you need to get all textures used in a mesh from code you need to use Irrlicht svn trunk.
The meshloaders there have a new interface IMeshLoader::setMeshTextureLoader that allows to set a custom texture loader which is then used by that meshloader. That way you can write your own texture-loader which for example logs all texture used in a mesh. Note that it's not supported yet for all meshloaders.
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
bruZard
Posts: 14
Joined: Thu Mar 19, 2009 9:21 am

Re: what's the texture?

Post by bruZard »

:)

My current Project is a Wrapper for Irrlicht (Blitz3D Style) and there is a function called "LoadMesh". These function have to load the mesh and have to figured out which textures the mesh have.
bruZard
Posts: 14
Joined: Thu Mar 19, 2009 9:21 am

Re: [solved] what's the texture?

Post by bruZard »

solution:

Code: Select all

 
meshNode->getMaterial(0).getTexture(0)->getName();
 
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: [solved] what's the texture?

Post by CuteAlien »

*sigh* sometimes I forget the simple answers :-)
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