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 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: 1k triangles at 60fps - acceptable?

  1. #11
    Junior Member Newbie
    Join Date
    Aug 2013
    Posts
    7
    Quote Originally Posted by Alfonse Reinheart View Post
    Well, the bigger question is why you're drawing so many triangles, all of which are overlapping, that close to the screen? Or more to the point: what are you drawing?
    I am just trying to prepare a simple framework (i.e. base-point) for further performance analysis of various shader code, GL settings, draw methods, etc.

  2. #12
    Junior Member Newbie
    Join Date
    Aug 2013
    Posts
    19
    Quote Originally Posted by red1939 View Post
    I see, so in other words, a more realistic scenario would be to draw these triangles in some distance, or at least smaller?
    Yes. Small triangles will be vertex-limited. But large triangles will be fragment-limited. One triangle has 3 vertices, but up to 1 million fragments, each of which takes separate attention from the gpu. Try making tiny triangles, and see if the speed shoots up.

  3. #13
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128
    Quote Originally Posted by Roaoul
    Small triangles will be vertex-limited.
    Your application will be limited by vertex processing if the overhead of vertex processing exceeds any other form of processing done by the GL or the application. Saying "small triangles will be vertex-limited" is kind of nonsense. And even if your triangles are small, the likelihood of becoming limited by vertex processing for a few hundred triangles is still very low unless your application is very, very trivial and your fragment shaders do absolutely nothing than export a constant color. You cannot be sure of anything unless you get hard numbers, especially when stuff seems to be trivial.

    Quote Originally Posted by Raoul
    One triangle has 3 vertices, but up to 1 million fragments
    Why up to 1 million? What if the triangle is large enough that it simply cover the whole screen after clipping? Does a full-HD fragment buffer only consist of 1 mio pixels? No.

  4. #14
    Junior Member Newbie
    Join Date
    Aug 2013
    Posts
    19
    Quote Originally Posted by thokra View Post
    ...
    Why up to 1 million? What if the triangle is large enough that it simply cover the whole screen after clipping? Does a full-HD fragment buffer only consist of 1 mio pixels? No.
    Oh. Newbie question: What is the maximum number of pixels a triangle could put to a "full-HD fragment buffer"? -thanks

  5. #15
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128
    A full-HD buffer usually has a resolution of 1920 x 1080 pixels. That's a little higher than a million.

  6. #16
    Junior Member Newbie
    Join Date
    Jul 2013
    Posts
    22
    Are you using 1000 draw calls?

  7. #17
    Junior Member Newbie
    Join Date
    Aug 2013
    Posts
    7
    Nope. 1000 x 3 triangles via one DrawArrays.

Posting Permissions

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