The problem is that, once i created my 3d scene with Sketchup and exported it using the plugin, created the file
.mesh, .materials and .jpeg, and copied the file ( .mesh in media/models, .materials in media/materials/scripts and .jpeg in media/materials/bitmap and copied this file also in the resource files of my project),
i compile the program with this code:
Code: Select all
#include "Ogre\ExampleApplication.h"
class Example1 : public ExampleApplication
{
public:
void createScene()
{
Ogre::SceneNode* Node = mSceneMgr->getRootSceneNode()->createChildSceneNode( "CubeNode" );
Ogre::Entity* Entity = mSceneMgr->createEntity( "Cube", "vico.mesh" );
Node->attachObject( Entity );
Entity->setMaterialName("vico.material");
Ogre::SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode( "Sesso");
Ogre::Entity* Sinbad = mSceneMgr->createEntity("Sinbad","Sinbad.mesh");
node2->attachObject(Sinbad);
Ogre::Light* light = mSceneMgr->createLight("Light1");
light->setType(Ogre::Light::LT_SPOTLIGHT);
}
};
int main (void)
{
Example1 app;
app.go();
return 0;
}
The mesh is on the screen, but without material, it is all white.
Can you help me to figure out what is the problem.