VBO fps problem can i draw 500 600 millions triangles ? if yes how please help me

hello

i am beginner. i have a problem with fps i am trying to see my GPU max performans with using VBO. i searched all day but i didnt fix this problem. i saw that everybody says GPU can draw 1 billion triangles(so 3 billion vertices) with VBO easily is it right? if it is right why i am taking 37 fps at only 8 million triangles(24million vertices) can you help me please sorry for bad english :).

i am not using shader also i dont know use it.
My GPU is (amd radeon hd 6870)
when 20k triangles fps=6000
when 8million triangles fps=37 and cpu usage %1 i think cpu don’t make bottleneck

my code like this:

i create in header file GLuint terrainVBO;

i made in init() fonk


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 : Can i draw 500 600 millions triangles (1.500.000.000 vertices) with good fps ? and how ? i could only draw 8 million triangles :frowning: please help me guys

The number of triangles is not that important. The size of your triangles matters far more. My crappy laptop can draw many millions of triangles if each triangle is only a single pixel in size if not less. But if each triangle is as large as the framebuffer I am capped at a few hundred thousands. There is no sense in counting triangles. Performance limits depend on many factors and is are a very complicated question on modern hardware.

Is (8 millions triangles =24.000.000 vertices for me i didnt draw normals,colors or textures so 24millions vertices * 3 (x,y,z) * sizeof(float)=288000000byte = 288megabyte ) size of triangles meaning ? if it is why my fps is falling to 37 at 288 megabyte also I’m grateful for your reply :slight_smile:

Not that size, the size of them on the screen.

is it grid size for terrain ? if it i tried to change grid size but i got same fps

No, the size in pixels.
If, when displayed, your triangle ends to a single pixel, it will render more fast that if it covers 1000 pixels, which will be more fast than if it covers 1000000 pixels.

Big triangle:

glBegin (GL_TRIANGLES);
glVertex (0,0,0);
glVertex (100,100,0);
glVertex (200,0,0);
glEnd ();

Small triangle:

glBegin (GL_TRIANGLES);
glVertex (0,0,0);
glVertex (1,1,0);
glVertex (2,0,0);
glEnd ();

The big triangle will be slower to draw than the small one. Vertex count is not the only factor that affects performance.

[QUOTE=mhagain;1287907]Big triangle:

glBegin (GL_TRIANGLES);
glVertex (0,0,0);
glVertex (100,100,0);
glVertex (200,0,0);
glEnd ();

Small triangle:

glBegin (GL_TRIANGLES);
glVertex (0,0,0);
glVertex (1,1,0);
glVertex (2,0,0);
glEnd ();

The big triangle will be slower to draw than the small one. Vertex count is not the only factor that affects performance.[/QUOTE]

i tested this with VBO (like my first message) but fps didnt change maybe it affects only glBegin glEnd ? sorry for delay, i saw your message after 3 days :slight_smile:

Did you test it with 1 triangle or with 100000 triangles?

with 1000*1000=1.000.000 triangles. i gave them 1 size and after i gave them 250 and 500 size but fps didnt change i will show with video can you watch . When i give 1 size i can go to end of terrain in 3 4 seconds you can see in video and if i give 250 or 500 size It takes much longer to go to the end of the terrain. Therefore i setup size of triangles correct why fps didnt change. Note: when video recorder off GPU using %100 and CPU doesnt do bottleneck and character doesnt affect fps when i close him still fps same
https://youtu.be/9825HB3bW74

in case you want to measure (in nanoseconds) how long it takes to draw your stuff:
https://www.khronos.org/opengl/wiki/Query_Object#Timer_queries

here’s an example code:
https://sites.google.com/site/john87connor/query-object/timer-query

Can i draw 500 600 millions triangles (1.500.000.000 vertices) with good fps ?

it depends on your graphics card, how you “shade” your triangles, how big they are, but certainly not with the “fixed-function pipeline” that you’re using.