bug of loading ogre mesh file

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
kevin_shanghai
Posts: 28
Joined: Wed Jan 30, 2013 3:29 am

bug of loading ogre mesh file

Post by kevin_shanghai »

HI !
I like irrlicht, it is good-design and easy to use, also code looks kinda beautiful,

today, i found a bug when i load my ogre mesh, the vertex color should have been assigned by color in material file,
I made following changes and it works,
in this method, i add a materialName parameter,
scene::SMeshBuffer* COgreMeshFileLoader::composeMeshBuffer(const core::array<s32>& indices, const OgreGeometry&
geom,const core::stringc& materialName)
{

scene::SMeshBuffer *mb=new scene::SMeshBuffer();

// here should compose material firstly,

composeMeshBufferMaterial(mb, materialName);
}

and in method, call composeMeshBuffer with material name parameter.
void COgreMeshFileLoader::composeObject(void)
{
composeMeshBuffer(Meshes.SubMeshes[j].Indices,
Meshes.Geometry,[img]Meshes.SubMeshes[j].Material[/img]);
}

the same modification should made to composeMeshBufferSkinned and composeMeshBufferLightMap


Thanks!
kevin_shanghai
Posts: 28
Joined: Wed Jan 30, 2013 3:29 am

Re: bug of loading ogre mesh file

Post by kevin_shanghai »

the version i used is 1.8 official
CuteAlien
Admin
Posts: 9809
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: bug of loading ogre mesh file

Post by CuteAlien »

Thanks. It would be great if you would have us some 3d model to reproduce this as example (if you can't post it public you can also send it by mail to one of the maintainers).
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