Low OpenGl performance


04-05-2009 11:57:07

After evaluating caelum and deciding to use it with OpenGl I noticed a huge difference in performance
against D3D.

In the included demo I get around 760 fps with D3D and only 120 fps on OGL.

Is it the shaders fault or has it to do something with ogre itself?

I'm compiling now on Linux to see if OGL performance is better there....


04-05-2009 15:11:29

I don't see why Direct3D would be 6 times faster than OpenGL; something must be wrong. But I don't really think that fps levels about 100 are all that useful for performance comparisons anyway. At such high speeds you probably run into silly driver/api issues.

If you really want to compare performance you should do a minimal integration into your app and check how fps changes when you completely add/remove Caelum. I'd also make sure enough additional content to bring the fps at least under vsync level. Caelum's samples are not really useful for performance tests because the other stuff they contain is not particularly optimized. Also: some of Direct3D's advantage is due to decreasing fpu precission. Try to set fpu mode to "consistent"; it might make for a fairer benchmark.

Caelum's shaders are not particularly optimized and could probably be made faster (and prettier). However I recently optimized the CPU parts in trunk and at least that part should be fast (thought I can still think of some ways to make it faster).


05-05-2009 15:18:26

Hi cdleonard.

I have compiled caelum for Linux and I get exact the same fps (~120-130 fps) for the caelumtest executable.

In D3d I use consistent floating point mode.

I agree with what you say about performance comparisons but this is an impressive difference. (For example on the fresnel demo I get 480 fps on OGL and only 60 on D3d.)

I also noticed that the overlay in OGL (in Linux and in win32) is grayed out like in the pictures below:



I will do what you say by using caelum in a more complex scene and I will post my results here for Linux and for win32.
Thank you.