Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main(int argc, char** argv)
{
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<u32>(640, 480), 16, false, false, false, 0);
device->setWindowCaption(L"Second Run");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Box", rect<int>(10,10,200,22), true);
IAnimatedMesh* mesh = smgr->getMesh("../../resources/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0, driver->getTexture("../../resources/sydney.bmp"));
} else {
device->drop();
return 1;
}
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(0,200,200,200));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
Code: Select all
Irrlicht Engine version 1.7.2
Linux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686
Creating X window...
Visual chosen: : 41
Using renderer: OpenGL 3.3.10237
ATI Radeon 3100 Graphics : ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 3.3
Could not load mesh, because file could not be opened: : ../../resources/sydney.md2
I had my friend, who has been using irrlicht for a year now, to have a look and he couldn't find anything out of place. So we're rather confused as to what is going. Any help or ideas would be great, thanks