Surprise !

I have made a test that shows a object (6 triangles) ~2’500’000 times with 3 methods …

  1. with glBegin(GL_TRIANGLES)/glEnd
  2. with CallList
  3. with glDrawElements

ALL use the same amount of time (~1.04 minutes) !

WHY!? (Graph. card is Ati Rage128 Pro)

I have placed objects in and out of view, near and faw - same result !

Maybe your driver doesn’t know how to optimize the storage properly, and therefore you won’t gain any speed by drawing in the different ways. Or maybe you are using the software renderer, or any kind of non-hardware accelerated environment, and the time you gain by drawing it in the different ways drowns in the huge amounts of time required to render the geometry in software.

Measuring triangle rates with just 6 triangles is pretty silly. Try 1000 triangles. With 6, the amount of call overhead is pretty high.

I’m not saying that this will change the numbers, but you can’t measure triangle rates with 6 triangles.

  • Matt

Yeah sure, but those six triangles are draws 2.5 million times

Anways, the amound of triangles is still too small. If you clear your screen between each redraw, your time includes 2.5 million buffer resets aswell. And in slightly large resolution, this itself can be the majority of the time. Go for mcraighead’s idea and draw more triangles, but maybe as much as 100.000, and then render them only once, and measure the time.

On my TNT2 ULTRA:

With display lists i got
Timer Frequency : 300.69 Mhz
5202 polygons in the scene
1000 frames rendered in 17.98 seconds -> fps=55.62 pps=289342.74

Without i got
Timer Frequency : 300.69 Mhz
5202 polygons in the scene
1000 frames rendered in 50.14 seconds -> fps=19.94 pps=103743.80

and my engine is in prealpha -> not optimised
DisplayLists are OBVIOUSLY faster !

As first …
"My English is good and i do not tolerate critic "

Originally posted by Bob:

Anways, the amound of triangles is still too small. If you clear your screen between each redraw, your time includes 2.5 million buffer resets aswell.

I have done it so …

glClear …
For 1…2500000 {
glTranslatef(-1,0,0)
Draw_My_Object}

But maybe my object is too simple for a noticeable effect. I will try more complex ones nearly …

I have found a similar problem with bitmap text (using glCallLists) - 15 lines of text half my FPS (ower screen transparent squares do not have such bad effect). Look …

  1. try - Clear screen ~200FPS
  2. try - Text only ~80FPS
  3. try - Square only ~190FPS
  4. try - Sqare+Text ~70FPS
    … on 600x800x16 mode.

NB! Can this be a problem of drivers? If it is (that is hard to belive) what can i do?

NB! My texture objects are ~5 times as fast as normal ones. I mean, texture objects are (nearly) the same thing as display lists, what do think about this?

Bitmap text is slow in general. Use textured quads instead.

Originally posted by DFrey:
Bitmap text is slow in general. Use textured quads instead.

Really!? Good point!

But, is it really SO slow (look my results)?

Originally posted by CS:
But, is it really SO slow (look my results)?

In short, yes. Many drivers have horrible implementations of glBitmap. We’re not totally innocent here, but GeForce should offer “reasonable” Bitmap performance.

  • Matt