OpenGL slower than Direct3D ?

Problems building or running the engine, queries about how to use features etc.
Post Reply
texel
Gnoblar
Posts: 11
Joined: Fri Sep 05, 2008 10:46 am

OpenGL slower than Direct3D ?

Post by texel » Fri Sep 05, 2008 10:55 am

Hi,

i am interested in Ogre.
i have just tested the Ogre demos for the first time.
Why the OpenGL rendering is slower than Direct3D under Windows XP ? ( Facial animation: 1165 fps with D3D 230 fps with OpenGL). Where is a big difference.

I have a GeForce 8800 GTS with driver 175.16

Thanks.
0 x

iigor
Gnome
Posts: 387
Joined: Thu May 08, 2008 3:46 pm
Location: Russia, Moscow

Post by iigor » Fri Sep 05, 2008 11:59 am

I think it's in windows realization of OpenGL( i think it's Microsoft work, to make users use only Directx, but may be i mistaken), because of at the Linux OpenGL shows about similar fps than D3D.
0 x

texel
Gnoblar
Posts: 11
Joined: Fri Sep 05, 2008 10:46 am

Post by texel » Fri Sep 05, 2008 1:08 pm

it's strange. Why Doom 3 and Quake 4 use OpenGL if it is x5 slower ?
10% of difference in performance could be acceptable, but 500% ...
Even Microsoft could not decrease performance at this point. Many companies use CAD software which use OpenGL under Windows.

Maybe i have to change some settings in the Ogre demo.
0 x

Commander
Kobold
Posts: 27
Joined: Thu Oct 11, 2007 12:43 am
Location: Aachen, Germany

Post by Commander » Fri Sep 05, 2008 2:37 pm

In my opinion it's not a valid test if you have more than a thousand FPS. 230 FPS is still way more than you usually need. There might be something similar to a VSync feature in OpenGL to limit the framerate (just a guess).

I'm sure if you test a scene where you have about 200 FPS with DirectX, you will see similar numbers in OpenGL.

As far as I know, OpenGL drivers are made mostly by the graphics card manufacturers and not by Microsoft, but still they put less effort into this than DirectX, so lower FPS will still be reasonable.
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Post by CABAListic » Fri Sep 05, 2008 3:23 pm

IIRC there were some OpenGL errors in some of the younger nvidia drivers, so this might well be a driver issue. The difference is not normally that large, usually less than 5% from my experience.
0 x

texel
Gnoblar
Posts: 11
Joined: Fri Sep 05, 2008 10:46 am

Post by texel » Fri Sep 05, 2008 3:30 pm

i understand that using just one test is not valid. I also understand that some operation can be faster with D3D and other can be faster with OpenGL, because of the way the 2 API are designed.
But all demos are faster in D3D, not just one. (Even if the difference is not alwas x5)

> I'm sure if you test a scene where you have about 200 FPS with DirectX, you will see similar numbers in OpenGL.
No. Exemple: "Grass via staticGeometry": 200fps with D3D, 100fps with OpenGL.

There is VSync feature in OpenGL and i don't think it is the problem (i would not have more than 80 fps).


I undersatnd that DirectX is more "integrated" in Windows system environement. I understand that Nvidia maybe create better driver for Direct3D.
But it seems the difference is too big.
I am a fan of OpenGL but it is sad to see this poor performance :(
I don't mean Ogre is bad coded (it seems to be very well coded). But i just want to know if it is possible to have better performance with OpenGL rendering.

Some time ago, i have made a simple 3d model viewer using OpenGL (without ogre). I have made one version using SDL for window manager, and the other version using the Win32 api for window manager. And it was a lot faster with SDL (maybe 150%).
Maybe there is the same problem with Ogre, and maybe it is possible to speed up rendering.
0 x

User avatar
SiENcE
Goblin
Posts: 231
Joined: Thu May 11, 2006 3:07 pm
Location: Berlin
Contact:

Post by SiENcE » Fri Sep 05, 2008 3:44 pm

@texel: You are right.

Using Ogre with OpenGL is slower than Direct3D.

This depends on several aspects.

For instance:
-OpenGL Architecture
-OpenGL Driver (Ati's is much more slower than the Nvidia one ... so the Nvidia one is one of the best OpenGL implementation i know)
-Renderer Plugin Implementation
-Programm implementation (cg shaders or nativ opengl glsl shaders)

There are a lot of possibilities. But on the whole, using OpenGL on Windows it's slower than Direct3D on Windows.

But this is nothing new.

ps: ati/amd opengl drivers are crap in comparsion to the nvidia one.
0 x

texel
Gnoblar
Posts: 11
Joined: Fri Sep 05, 2008 10:46 am

Post by texel » Fri Sep 05, 2008 4:02 pm

Ok.
I have just tested the demo of Irrlicht 3d engine.
The OpenGL 1.5 renderer and the D3D renderer seems to have the same performance (In some demo OpenGL is even faster than D3D)
But maybe there D3D renderer is not optimized...
It's hard to choose an 3D Engine :)
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Post by CABAListic » Fri Sep 05, 2008 5:19 pm

Well, as already stated, OpenGL is slower with Ogre, but only slightly. Your measured discrepancies are unnormal and do suggest a driver issue.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Fri Sep 05, 2008 6:19 pm

Bear in mind we use GL 2.1+ (if available), and not many games use anything newer than GL 1.3 because GL is hugely out of fashion now. As such, GL drivers are not usually as well optimised. Quake & Doom use very old API calls that the driver writers specifically optimised for - not so much the things we use now.

We may well have some headroom for optimisation too, but it's odd that if I run Linux, GL is much faster there.
0 x

texel
Gnoblar
Posts: 11
Joined: Fri Sep 05, 2008 10:46 am

Post by texel » Fri Sep 05, 2008 6:45 pm

Ok. I think it comes from the driver. I have not tested with latest Nvidia drivers but i have tested the Ogre Demo in my old PC (AMD64 3000 with ATI Radeon 9600 XT), and OpenGL and D3D rendering are more close, and even equal for some demos.

The "Facial animation" demo is x2 faster with OpenGL on my old PC than with the GeForce 8800 GTS (more than 500 fps). Strange, because i think OpenGL 2.1 extension are supported on my ATI 9600 XT.

Thanks
0 x

Post Reply