Jump to content

  • Log In with Google      Sign In   
  • Create Account

how to get the quantity of drawn triangles or points in OpenGL?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 yan_qingsong   Members   -  Reputation: 126

Like
0Likes
Like

Posted 25 July 2014 - 06:00 AM

In OpenGL,is there a build-in function that can get the quantity of drawn triangles or points?

Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 13576

Like
0Likes
Like

Posted 25 July 2014 - 09:10 AM

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
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 mhagain   Crossbones+   -  Reputation: 7960

Like
0Likes
Like

Posted 25 July 2014 - 09:15 AM

Can you clarify if you are looking for:

  1. The number of points, lines or triangles submitted via draw calls, or,
  2. The number of points, lines or triangles actually drawn on-screen after clipping, culling, etc?

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#4 yan_qingsong   Members   -  Reputation: 126

Like
0Likes
Like

Posted 25 July 2014 - 09:05 PM


The number of points, lines or triangles actually drawn on-screen after clipping, culling, etc?

I want to know this.



#5 mhagain   Crossbones+   -  Reputation: 7960

Like
1Likes
Like

Posted 26 July 2014 - 03:53 AM

 


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.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS