Rendering a lot of vertex


I need to render an object with a lot of vertex, so as I read in this forum, I need to use vertex arrays to do this more eficient.

The question now is how eficient is this? The rendering is of 6 objects, each of them have for than 1400 vertex divided in groups of 3 (triangles).

What I need to do? Sending arrays of 3 vertex at each time? Is this eficient? 6 objects * 1400/3 = 2796 arrays more or less(Do you understand my question?)


Question was not understood, but…

Vertex arrays allows you to send vertices for MORE than one primitive at once, so sending 6 vertex arrays 1400 vertices each seems like a good idea. This would result in only six draw calls.

If vertices does not change in each frame you should also consider using VBO instead of user memory (keep vertex data in GL_ARRAY_BUFFER).

These objects are joints of a robot. So if I don’t send any signal from my Qt interface they won’t move.

However, the problem, and the reason for this post, is the function paintGL. Each time I call updateGL (so paintGL), I redraw all vertex and it can be too much.

VBO can fix this?

Not necessarily. However you could draw to an offscreen framebuffer and then your paintGL function could simply paint the offscreen texture onto the main window.