how to run an exported mesh and its material and texture?

elieajaltouni

14-05-2009 20:01:25

Hi I have used LEXIExport to export a mesh from 3d max and I got the following files:
Box01.mesh
01 - Default.material
Blinn.cg
BrickWall.jpg
Shaders.program

I was able to load the mesh using ogre by following the basic tutorial 1 on the ogre wiki.
mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) );
Entity *ent1 = mSceneMgr->createEntity( "Box", "Box01.mesh" );
SceneNode *node1 = mSceneMgr->getRootSceneNode()->createChildSceneNode( "BoxNode" );
node1->attachObject( ent1 );

However, the model is appearing all white with no texture which is obvious since in my code I have
not loaded the material and the rest of the files.

My Question is: HOW CAN I LOAD THE MATERIAL AND TEXTURE IN ORGE

CAN SOMEONE PLEASE PROVIDE ME THE CODE TO DO THIS
THANK YOU