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!
bug of loading ogre mesh file
-
- Posts: 28
- Joined: Wed Jan 30, 2013 3:29 am
Re: bug of loading ogre mesh file
the version i used is 1.8 official
Re: bug of loading ogre mesh file
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm