I'm getting framerates below 10.
I don't think my PC is the problem because I can play commercial games with better framerates (not the newer games like Crysis or CoD 5).
Here's my entire code:
Code: Select all
#include <irrlicht.h>
#include <iostream>
using namespace irr;
int main() {
//Create Irrlicht Device
IrrlichtDevice* device = createDevice( video::EDT_BURNINGSVIDEO, core::dimension2d<s32>( 1028, 700 ) );
if ( device == 0 )
return 1;
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
//Load File
device->getFileSystem()->addZipFileArchive( "../../media/map-20kdm2.pk3" );
//Load Mesh
scene::IAnimatedMesh* mesh = smgr->getMesh( "20kdm2.bsp" );
//Create Scene Node
scene::ISceneNode* node = smgr->addOctTreeSceneNode( mesh->getMesh(0), 0, -1, 1024 );
//Create Camera
smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible( 0 );
int lastFPS = -1;
while( device->run() ) {
driver->beginScene( 1, 1, video::SColor( 255, 0, 0, 0 ) );
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if ( lastFPS != fps ) {
core::stringw str = L"FPS: ";
str += fps;
device->setWindowCaption( str.c_str() );
lastFPS = fps;
}
}
device->drop();
return 0;
}
Intel Dual Core 2.00GHz
3GB RAM
Mobile Intel 4 Series Express Chipset Family
I know my graphics card isn't that great but I'd expect that I would still get better results.