Code: Select all
Could not load mesh, because the file could not be opened: ../../media/sydney.md2
Code: Select all
Could not load mesh, because the file could not be opened: ../../media/sydney.md2
Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
int main()
{
IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<s32>(512,384),16,false,false,false,0);
device->setWindowCaption(L"Hello World Program! - My first Irrlicht Program by me");
IVideoDriver*driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software Engine!", rect<int>(10,10,200,22), true);
IAnimatedMesh* mesh = smgr->getMesh("C:\Documents and Settings\Knuckles\Desktop\irrlicht-1.3\media\sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0,310);
node->setMaterialTexture(0, driver->getTexture("C:\Documents and Settings\Knuckles\Desktop\irrlicht-1.3\media\media\sydney.bmp"));
}
smgr->addCameraSceneNode(0,vector3df(0,30,-40), vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
"C:\Documents and Settings\Knuckles\Desktop\irrlicht-1.3\media\sydney.md2"