pakou
09-07-2005, 05:38 AM
Hi there,
As we can see over the internet, glDrawElements seems better than glDrawArrays.
In my testbed, i use 40000 calls to glDrawElements and the vertex and element arrays are buffer objects created with the static draw flag for maximum performance.
If I draw a 4 component element array, then the framerate is OK. If it is a 200 component element array, the framerate drops. It seems that I am CPU bound. So glDrawElement takes a proportional time according to the number of element array components, probably because elements are sumbmitted to the GPU by CPU.
So I came to the idea that, if the geometry were a perfect strip, it would be faster to use glDrawArrays that should perform in a constant time on the CPU side.
Am I right ?
Thanx, pakou...
As we can see over the internet, glDrawElements seems better than glDrawArrays.
In my testbed, i use 40000 calls to glDrawElements and the vertex and element arrays are buffer objects created with the static draw flag for maximum performance.
If I draw a 4 component element array, then the framerate is OK. If it is a 200 component element array, the framerate drops. It seems that I am CPU bound. So glDrawElement takes a proportional time according to the number of element array components, probably because elements are sumbmitted to the GPU by CPU.
So I came to the idea that, if the geometry were a perfect strip, it would be faster to use glDrawArrays that should perform in a constant time on the CPU side.
Am I right ?
Thanx, pakou...