Page 1 of 1

Irrlicht Slow Performance on Mediocre Laptop

Posted: Mon Jun 01, 2009 4:43 pm
by sparkart
I'm new to Irrlicht and following the beginner tutorials, I've just loaded the Quake Map (tutorial 2) and used DirectX 9 for the display driver.

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;
}
My system specs:
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.

Posted: Mon Jun 01, 2009 4:47 pm
by JP
You could try ensuring you have the latest drivers for your gfx card, might help!

Posted: Mon Jun 01, 2009 5:08 pm
by DeM0nFiRe
Your problem is that it is a laptop, meaning it has an integrated video chip. I've tried Irrlicht on several different integrated chips and had no luck.

Posted: Mon Jun 01, 2009 5:14 pm
by CuteAlien
You are using a software renderer. video::EDT_BURNINGSVIDEO is not using the hardware acceleration from directx. Try using EDT_DIRECT3D9 or EDT_OPENGL instead and it should be a lot faster.

Posted: Mon Jun 01, 2009 5:16 pm
by sparkart
I'm also having problems getting DirectX to work with Irrlicht.

The IDE that I'm using is Code::Blocks.

Tried searching with google with no luck.

Posted: Mon Jun 01, 2009 5:18 pm
by sparkart
Thanks for the tips. I switched to OpenGL, but I am still interested in getting DX to work.

My FPS is now 300+.

Posted: Mon Jun 01, 2009 6:16 pm
by arras
for DirectX to work with Code::Blocks you have to recompile Irrlicht. Or you can look at the forums some people did it probably already. Look at FAQs, Tutorials, Howtos, and external tool lists I think I saw it there somewhere.

Posted: Mon Jun 01, 2009 6:25 pm
by JP
Yep search the forums for IrrDX and you'll find the thread. On the last page you'll be able to download the necessary DLLs.

I don't know

Posted: Tue Jun 02, 2009 12:27 am
by 3DModelerMan
I don't know. I'm using a dual core processor, and integrated graphics. But 1GB of RAM and my game is definitely more intensive than the Q3 tut.
It still runs at a good 40-50 FPS on my laptop.

Posted: Wed Jun 03, 2009 7:57 am
by abhishekdey1985
I have a Pentium M Laptop with 512 DDR, S3 Integrated Graphics...still the irrlicht programs works at guud FPS!!