¿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)?
¿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.
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.