Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

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

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2017
    Posts
    7

    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

    Code cpp:
    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:

    Code cpp:
    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 please help me guys
    Last edited by Dark Photon; 07-17-2017 at 06:21 PM.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2013
    Posts
    171
    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.

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2017
    Posts
    7
    Quote Originally Posted by Cornix View Post
    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

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,687
    Not that size, the size of them on the screen.

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2017
    Posts
    7
    Quote Originally Posted by mhagain View Post
    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

  6. #6
    Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    420
    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.

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,687
    Big triangle:
    Code :
    glBegin (GL_TRIANGLES);
    glVertex (0,0,0);
    glVertex (100,100,0);
    glVertex (200,0,0);
    glEnd ();
    Small triangle:
    Code :
    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.

  8. #8
    Junior Member Newbie
    Join Date
    Jul 2017
    Posts
    7
    Quote Originally Posted by mhagain View Post
    Big triangle:
    Code :
    glBegin (GL_TRIANGLES);
    glVertex (0,0,0);
    glVertex (100,100,0);
    glVertex (200,0,0);
    glEnd ();
    Small triangle:
    Code :
    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.
    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

  9. #9
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,687
    Did you test it with 1 triangle or with 100000 triangles?

  10. #10
    Junior Member Newbie
    Join Date
    Jul 2017
    Posts
    7
    Quote Originally Posted by mhagain View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •