Irrlicht Slow Performance on Mediocre Laptop

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
sparkart
Posts: 8
Joined: Mon Jun 01, 2009 4:35 pm

Irrlicht Slow Performance on Mediocre Laptop

Post 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.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

You could try ensuring you have the latest drivers for your gfx card, might help!
Image Image Image
DeM0nFiRe
Posts: 117
Joined: Thu Oct 16, 2008 11:59 pm

Post 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.
CuteAlien
Admin
Posts: 9721
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
sparkart
Posts: 8
Joined: Mon Jun 01, 2009 4:35 pm

Post 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.
sparkart
Posts: 8
Joined: Mon Jun 01, 2009 4:35 pm

Post 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+.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post 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.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

I don't know

Post 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.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
abhishekdey1985
Posts: 102
Joined: Sat Jan 17, 2009 4:33 am
Location: Pune
Contact:

Post by abhishekdey1985 »

I have a Pentium M Laptop with 512 DDR, S3 Integrated Graphics...still the irrlicht programs works at guud FPS!!
I work on "The Best Real-Time 3D Engine"
Post Reply