[SOLVED] OpenGL and Unlock

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
techiemac
Posts: 14
Joined: Tue Dec 26, 2006 7:16 pm

[SOLVED] OpenGL and Unlock

Post by techiemac »

So I am a complete newbie to Irrlicht but I must say... very nice engine! I really like the Object Oriented approach to everything.

That said, I'm having some newbie problems (or maybe my complete lack of understanding of the differences between OpenGL and DirectX 9).

Currently I am using full screen 1280x1024x32 mode with a dual monitor setup (so I can debug on one of my monitors). One little thing that I noticed is when I do a ITexture::unlock() using DirectX, the unlock is nearly instantaneous (measured with boost::posix_time::ptime). Assume the texture is 640x480x32 (yea, I know... pretty big texture :) ).

When I do an ITexture::unlock() using OpenGL, however, it takes between 100ms to 120ms! Pretty big performance hit there. I figured I must be doing something wrong here. I dug into the library, and granted I should probably dig in deeper, but I noticed the COpenGLTexture::Unlock() was calling COpenGLTexture::copyTexture(false).

Is there something that I am doing that is just brain dead here?

Any help would be much appreciated!
3ddev
Posts: 169
Joined: Tue Sep 19, 2006 6:51 am
Contact:

Post by 3ddev »

I suspect it is your driver or graphics card. Support for OpenGL really ranges from card to card and on different hardware. The only thing to do is buy a new card or download an appropriate driver and hope that fixes it. BTW, I know that many people have had trouble with quality and speed on dual monitors using OpenGL. Again, buy a new card and see what happens. :wink:
techiemac
Posts: 14
Joined: Tue Dec 26, 2006 7:16 pm

Post by techiemac »

Hmm...

I have a GeForce 7600 GT with the latest drivers and the OpenGL Extenions Viewer reports 100% compatibility up to V2.1 (Only unsupported feature is Shading Language Version 1.20). So I don't know if it's a hardware issue. Thanks for the input though!

If only DirectX would give me exclusive access to one monitor and let me work on the other :)
techiemac
Posts: 14
Joined: Tue Dec 26, 2006 7:16 pm

Post by techiemac »

Well I figured it out!

So instead of keeping my solution as a deep dark secret I'll present my solution (don't you love the postings that say "I figured it out" and nothing more :) ).

I recompiled Irrlicht with MIP mapping disabled. So all I had to do is define DISABLE_MIPMAPPING

My performance is great right now. Right on par with DirectX!
Post Reply