how to get the quantity of drawn triangles or points in OpenGL?
In OpenGL,is there a build-in function that can get the quantity of drawn triangles or points?
The number of triangles drawn since when?
OpenGL doesn’t know how to answer this and thus there is no functionality for it.
If you want to know, keep track by yourself. Every time you draw you know how many triangles you are drawing. Add them by yourself and reset back to 0 at the end of each frame if you want to know how many triangles drawn in a frame.
Just remember to use a 64-bit unsigned integer type for it.
L. Spiro
OpenGL doesn’t know how to answer this and thus there is no functionality for it.
If you want to know, keep track by yourself. Every time you draw you know how many triangles you are drawing. Add them by yourself and reset back to 0 at the end of each frame if you want to know how many triangles drawn in a frame.
Just remember to use a 64-bit unsigned integer type for it.
L. Spiro
Can you clarify if you are looking for:
- The number of points, lines or triangles submitted via draw calls, or,
- The number of points, lines or triangles actually drawn on-screen after clipping, culling, etc?
The number of points, lines or triangles actually drawn on-screen after clipping, culling, etc?
I want to know this.
The number of points, lines or triangles actually drawn on-screen after clipping, culling, etc?I want to know this.
OK, so keeping track of it yourself won't work, and there is no cross-vendor GL call for this. You'll need to rely on vendor-specific extensions (where they exist) and/or vendor-specific tools to get this information.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement