Cannot load BSP mesh
Posted: Mon Feb 26, 2007 12:56 am
Hello all! I just recently started using Irrlicht, as I plan on making a game that messes with your mind (everything has its own gravity + portals). My first example was just the CodeBlocks template for Irrlicht (I use code::blocks and mingw). It compiled and worked beautifully. Except for one thing - DirectX does not work (only software and OpenGL). It was not compiled into the pre-built lib. Either way, I was fine with OpenGL so I kept going.
Now I attempted to create a less basic program - load a BSP, make physics for it (using Newton), and allow the player to throw around boxes. With a twist though, depending on what keys you pressed (1/2/3/4/5/6) the gravity for each box you threw would be different (1 would be +x, 6 would be -z, etc.). Part of the "messing with your mind" concept.
The problem is, I recieve a NULL mesh for the BSP when I attempt to load it. As so:
First it just crashed. Debugged it, segfault on the last line. sceneMgr was fine, so it must be levelMesh. Check for nullness and guess what? IT'S NULL. ("Process returned 12")
First I thought it wasn't getting the data from the zip correctly. So I de-zipped it, and commented out that line (and changed the directory for the .BSP to reflect that). Nope, still crashed.
I went out and tried other demos that load BSP maps. They work fine. I compile them - same thing happens. So it's obviously not my code but the libs I'm using. I attempt to use the VC++ libs, but get a linker error (A LOT (LOT LOT) of useless characters)...
I went off to compile Irrlicht from source. Same thing.
I'm out of ideas... Anyone? Does anyone have working mingw libs? I'm not changing compilers just to be able to use Irrlicht. It should supposedly work!
What do I do?
Thanks in advance!
EDIT: I was going to try code::blocks with the visual C++ 2003 toolkit (and hope that everything would compile without any change), ONLY TO FIND THAT MICROSOFT REPLACED IT WITH VISUAL C++ 2005 EXPRESS. I don't want that bloaty piece of crap. I just want the compiler...
Now I attempted to create a less basic program - load a BSP, make physics for it (using Newton), and allow the player to throw around boxes. With a twist though, depending on what keys you pressed (1/2/3/4/5/6) the gravity for each box you threw would be different (1 would be +x, 6 would be -z, etc.). Part of the "messing with your mind" concept.
The problem is, I recieve a NULL mesh for the BSP when I attempt to load it. As so:
Code: Select all
//device->getFileSystem()->addZipFileArchive("./Data/Map.pk3");
scene::IAnimatedMesh *levelMesh = sceneMgr->getMesh("../Data/maps/Map.bsp");
if (!levelMesh) return 12;
scene::ISceneNode *levelNode = sceneMgr->addOctTreeSceneNode(levelMesh->getMesh(0));
First I thought it wasn't getting the data from the zip correctly. So I de-zipped it, and commented out that line (and changed the directory for the .BSP to reflect that). Nope, still crashed.
I went out and tried other demos that load BSP maps. They work fine. I compile them - same thing happens. So it's obviously not my code but the libs I'm using. I attempt to use the VC++ libs, but get a linker error (A LOT (LOT LOT) of useless characters)...
I went off to compile Irrlicht from source. Same thing.
I'm out of ideas... Anyone? Does anyone have working mingw libs? I'm not changing compilers just to be able to use Irrlicht. It should supposedly work!
What do I do?
Thanks in advance!
EDIT: I was going to try code::blocks with the visual C++ 2003 toolkit (and hope that everything would compile without any change), ONLY TO FIND THAT MICROSOFT REPLACED IT WITH VISUAL C++ 2005 EXPRESS. I don't want that bloaty piece of crap. I just want the compiler...