I don't think there's anything wrong with my code (although I don't like how Dev-C++ decided to format things for me -.-)
EDIT: I should also mention it is just a gray box, but SOME things are loaded, I cannot see them
(I googled the map and came up with this one)
Code: Select all
// HelloUniverse.cpp
// Include the Irrlicht header
#include "irrlicht.h"
// Irrlicht Namespaces
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice *device =
createDevice(video::EDT_OPENGL,
core::dimension2d<s32>(640, 480), 16);
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
device->getFileSystem()->addZipFileArchive(
"20kdm3beta.pk3");
scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm3beta.bsp");
scene::ISceneNode* node = 0;
if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
if (node)
node->setPosition(core::vector3df(-1300,-144,-1249));
device->getCursorControl()->setVisible(false);
int lastFPS = -1;
while(device->run())
{
driver->beginScene(true, true, video::SColor(0,100,100,100));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
wchar_t tmp[1024];
swprintf(tmp, 1024,
L"Quake 3 Map Example - Irrlicht Engine (fps:%d) Triangles:%d",
fps, driver->getPrimitiveCountDrawn());
device->setWindowCaption(tmp);
lastFPS = fps;
}
}
device->drop();
return 0;
}
I've seen it before in a couple open source programs I skimmed through, never really understood it (If you don't mind explaining )