I'm using D3D9 and a rather modern ATI 4800HD card. The crash occurs in Irrlicht.dll.
However, I did some more testing and now I believe there might be a bug in Irrlicht's mesh loader or file system.
Here's a compilable example:
obj File is in text format
X File is in binary format
Code: Select all
#include <Irrlicht.h>
using namespace irr;
using namespace video;
using namespace core;
using namespace scene;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
int main()
{
IrrlichtDevice *device = createDevice(EDT_DIRECT3D9, dimension2du(800,600), 32, 0, 0, 1);
IVideoDriver *driver = device->getVideoDriver();
ISceneManager *smgr = device->getSceneManager();
device->getFileSystem()->addFileArchive("data/", true, true, EFAT_FOLDER);
smgr->getMesh("border.obj");
smgr->getMesh("HQ.X");
while(device->run())
{
driver->beginScene(true, true, SColor(0, 0, 0, 0));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
Files in subfolder "data"
run inside IDE :
all good
run exe :
Loaded mesh: border.obj
Unknown data object in animation of .x file: DWORD
Loaded mesh: HQ.X
--------------------------------------------------
Code: Select all
device->getFileSystem()->addFileArchive("data/", true, true, EFAT_FOLDER);
// smgr->getMesh("border.obj");
smgr->getMesh("HQ.X");
Files in subfolder "data"
run inside IDE :
all good
run exe :
all good
--------------------------------------------------
Code: Select all
// device->getFileSystem()->addFileArchive("data/", true, true, EFAT_FOLDER);
smgr->getMesh("border.obj");
smgr->getMesh("HQ.X");
Files in the same folder
run inside IDE :
all good
run exe :
all good
--------------------------------------------------
I've no idea why it doesn't crash like that anymore, but there are still weird things going on.
Here are the
files
Never take advice from someone who likes to give advice, so take my advice and don't take it.