|
Rendering huge amount of vertices (again)Finally I can stress QC performance with a simple plugin that uses OpenGL VertexArray to draw huge amount of vertices. Results are VERY GOOD, and now I can really understand the difference between rendering primitives in the old style glBegin/glEnd and vertex arrays. You can test by your own vertex array performances using this plugin. Also, it results that rendering points is faster than rendering lines (in the plugin inputs, use primitiveType 0 for points, 1 for lines).
|
Nice! getting a steady 60fps up to 600000 vertices or 100000 lines on a early mbp2008 2.6c2d.
If you switch to VAO, VBOs, with index buffer arrays on the GPU. VAOs are VBOs that encapsulate all state associated with the VBO (which buffers are bound where, etc) you can get even greater performance. Less draw calls, more encapsulated, pre-verified state means over-all wins.
glBegin/end is very bad for performance, especially if you want to draw lots of geometry.
Ok, I try to switch to VBO, but It seems to not work properly. I made VBO setup in this way:
..I follow basic VBO setup from OpenGL Redbook, but maybe I forgot something in VBO setup? :\
I realized that this plugin may crash in Lion: the setup for Vertex Arrays I used compile well in Lion but crash in QC under Lion. Now I'm working with this kind of setup:
It works for me in Lion 10.7.1