VBO Frame Rate fall

Hi! I’m using VBO’s for render parametric surfaces. I’ve got this frame rate for a simple plane (not texturized, gouraud shading)

Tesselation Triangles (1 unique strip) FPS

50x50 5196 > 6000
100x100 20396 > 5500-6000
200x200 80796 > 75.7 --> Great FALL!
500x500 501996 > 12.0 --> Great FALL!

In other side…

Tesselation Triangles (100 strips) FPS

50x50(100 times) 519600 > 1350

Tesselation Triangles (1000 strips) FPS

50x50(1000 times) 5196000 > 250

¿Is there any limit for VBO index buffer size? I’m understand that OpenGL works better with little number of large geometry batches. It´s not the case.
¿It’s a platform specific problem (i’m working in Snow Leopard)?

Thanks a million!!

¿Is there any limit for VBO index buffer size?
Depends on your hardware and drivers. Some older drivers can only do 16-bit indexes in hardware, so as a matter of policy I would always advise to use 16-bit indexes.

As your drops seem to occur above the 16-bit limit I would guess that you’re using 32-bit indexes and your hardware doesn’t support them. You could confirm this by playing with element counts around the 65536 mark and see if it plummets when you go over.

If you feed 32-bit indexes to an implementation that can’t support them, what happens next is entirely up to the implementation. Best case is that it will copy them off to a 16-bit buffer and use that, worst case is that the implementation will unroll your carefully constructed VBO and IBO into immediate mode calls.

That’s is!!!

Tesselation Triangles (1 unique strip) FPS

180x180 65516 > 6000 FPS
185x185 69186 82 FPS --> Great FALL!

Thank you for your answer!!

One note…
The performance drop occurs when the SIZE OF INDEX BUFFER became 32bits, no when the index element size is 32bits (vertex buffer with more than 0xFFFF elements) ¿?¿?
In the preview example 65516 / 69186 is the number of triangles (NO VERTEXES) is aprox the number of indexes (I’m using a unique strip with degenerate triangles)

In both examples i’m using 16 bits indexes (185x185 = 34225)…i’m not found a logic answer
In any case, spliting a big grid in 180x180 max-size subgrids the performance is excellent

I know nVidia inparticular has always favoured 16-bit indicies historically. because these are half the size of integers, they pack nicely and save bandwidth.

You’ll probably get better performance if you drop the strip and use GL_TRIANGLES instead (you’ll definitely be able to reduce the number of vertexes further, and getting rid of the need for degenerate triangles will increase vertex shader performance). Don’t believe everything you read about triangle strips - they were optimal in 1998 for sure, but today you should be using GL_TRIANGLES everywhere and letting your index buffer define the ordering.