# How can I draw 500 million triangles with OpenGL?

I am a beginner. I have a problem with my frame rate. I am trying to see my GPUs maximum performance with using VBO. I saw that everybody says a GPU can draw 1 billion triangles (so 3 billion vertices) with VBO easily, is it right? If it is right, then why am I getting 37 FPS at only 8 million triangles (24 million vertices)?

I am not using a shader and I don't know how to use it.

My GPU is (amd radeon hd 6870).

When drawing 20k triangles, the frame rate is 6000, when drawing 8 million triangles, the frame rate is 37 and CPU usage 1%. I don't think the CPU is the bottleneck..

My code is like this:

GLuint terrainVBO;


I made an init() function:

glGenBuffers(1,&terrainVBO);
glBindBuffer(GL_ARRAY_BUFFER,terrainVBO);
glBufferData(GL_ARRAY_BUFFER,terrainVertices.size()*sizeof(terrainVec),&terrainVertices[0],GL_STATIC_DRAW);


and draw in my main loop:

glBindBuffer(GL_ARRAY_BUFFER,terrainVBO);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3,GL_FLOAT,3*sizeof(float),0);

glDrawArrays(GL_TRIANGLES,0,terrainVertices.size());

glDisableClientState(GL_VERTEX_ARRAY);
glBindBuffer(GL_ARRAY_BUFFER,0);


Summary: How can I draw 500-600 millions triangles (1.5 billion vertices) with a good frame rate? I could only draw 8 million triangles.

• Why do you need 500 million? Not even AAA games use that much – Bálint Jul 17 '17 at 17:47
• 1200000000 vs. 296000000 triangles a second. Sounds about right considering the additional overhead of handling that much data. I guess the answer is "you can't". – user59192 Jul 17 '17 at 19:22
• Yes, you can't, even with the newest GPUs I think you can get at most 10 millions. Search on YouTube particles simulations and you'll get an idea. (With a gtx 780 I could reach 6 millions if I remember right, but I think the bottleneck was the updating of particles CPU side, with a compute shader I think you can get something more – Liuka Jul 17 '17 at 21:06
• Therefore is average value (8 million triangles= 37 fps ) ? is it normal ? and thank you for your comments guys – Emre Kaya Jul 18 '17 at 4:25
• @EmreKaya Well, you shouldn't expect anything crazy with the naive approach. You should consider yourself lucky you are getting anything rendered at all with no shader. It is just unreasonable to expect to copy over that much data to the GPU and expect it to handle it fast. To get anything special, you will need to learn shaders, specifically the more advanced ones, so you can generate triangles in flight. – rationalcoder Jul 18 '17 at 4:45