Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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: 20320

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

#3 mhagain   Crossbones+   -  Reputation: 9623

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: 9623

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