Low FPS on the second tutorial ( loading Quake 3 maps )

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
PizzaTheHutt

Low FPS on the second tutorial ( loading Quake 3 maps )

Post by PizzaTheHutt »

Hey everyone!
First, let me tell you that I've just started using the Irrlicht engine, but I love it!

Now, for my question. In the second tutorial ( loading Quake 3 maps ) the FPS is VERY low ( the highest I got was 5! ). I don't think it's a problem with my computer, since I ran Doom 3 on High Settings smoothly.
Does anyone know how I can fix this?

Thanks for your time!
Guest

Post by Guest »

ehr ... how could we possibly help you without seeing your sourcecode? :?
PizzaTheHutt

Post by PizzaTheHutt »

Umm . . . I could post the source code but that would be useless, because it's the same as the second tutorial's source code.

But, oh well, I'll post it anyways. I took out all the comments to save space.

#include <irrlicht/irrlicht.h>
#include <iostream>

using namespace irr;
#pragma comment ( lib, "Irrlicht.lib" )

int main()
{
video::E_DRIVER_TYPE driverType = video::EDT_DIRECTX9;
printf ( "Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.2\n"\
" (d) Software Renderer\n (e) NullDevice\n (otherKey) exit\n\n" );

char i;
std::cin >> i;

switch ( i )
{
case 'a': driverType = video::EDT_DIRECTX9; break;
case 'b': driverType = video::EDT_DIRECTX8; break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_NULL; break;
default: return 1;
}

IrrlichtDevice *device =
createDevice ( driverType, core::dimension2d<s32>(640, 480 ) );

if ( device == 0 )
return 1;

video::IVideoDriver *driver = device->getVideoDriver();
scene::ISceneManager *smgr = device->getSceneManager();

device->getFileSystem()->addZipFileArchive ( "../media/map-20kdm2.pk3" );

scene::IAnimatedMesh *mesh = smgr->getMesh ( "20kdm2.bsp" );
scene::ISceneNode *node = 0;

if ( mesh )
node = smgr->addOctTreeSceneNode ( mesh->getMesh ( 0 ) );

if ( node )
node->setPosition ( core::vector3df ( -1300, -144, -1249 ) );

smgr->addCameraSceneNodeFPS();

device->getCursorControl()->setVisible ( false );

int lastFPS = -1;

while ( device->run() )
{
driver->beginScene ( true, true, video::SColor ( 0, 200, 200, 200 ) );
smgr->drawAll();
driver->endScene();

int fps = driver->getFPS();

if ( lastFPS != fps )
{
core::stringw str = L"Irrlicht Engine - Quake 3 Map example [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption ( str.c_str() );
lastFPS = fps;
}
}

device->drop();
return 0;
}
PizzaTheHutt

Post by PizzaTheHutt »

By the way, I'm using Red Hat Enterprise Linux 4 and I put the Irrlicht includes in /usr/include/irrlicht
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Hmm, i thought that all Linux-powered users are at least able to search in contrast all that noobs with windows...
PizzaTheHutt - this question was discussed so many times, try to use search in forum, please.
Guest

Post by Guest »

Hmm, i thought that all Linux-powered users are at least able to search in contrast all that noobs with windows...
LOL! nice one!! :D
PizzaTheHutt

Post by PizzaTheHutt »

puh wrote:Hmm, i thought that all Linux-powered users are at least able to search in contrast all that noobs with windows...
PizzaTheHutt - this question was discussed so many times, try to use search in forum, please.
You really believe I haven't searched? It may not seem like it, but I'm not dumb!

Thanks anyways.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Hmm, maybe you are right, PizzaTheHutt... At least you have compiled Irr in Linux is worth to respect you.
Just another one link: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=7024
Couldn't help you much though as i'm myself just a stupid windows noob :shock:
PizzaTheHutt

Post by PizzaTheHutt »

Thanks a bunch! From what I understood I need to include /usr/share/doc/NVIDIA_GLX-1.0/include/ ( at least on my system that's where GL/glx.h from NVIDIA is ) when I build Irrlicht, right?

Thanks again!
PizzaTheHutt

Post by PizzaTheHutt »

OK, I fixed the problem.

What I did was uninstall and reinstall NVidia ( actually, I uninstall and --update it ;) ). Apperantly I didn't install it properly last time.
Thanks for trying guys!
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

put down the code and go watch spaceballs another time ya goofy bitch.
Post Reply