[info-performer] Counting polygons

Date view Thread view Subject view Author view

From: Dorosky, Christopher G (christopher.g.dorosky++at++lmco.com)
Date: 07/22/2003 08:50:28


I would like to count how many polygons are displayed, within a generic model.
There are lots of these models, and they all have LOD's.

The brute force approach is to count the number of polygons in each geoset, for each LOD, and figure out how many would be displayed for each given LOD combination.

Is there a way, with a pre and post draw callback, to count the number of polygons that we actually draw, per model, per frame?
IE.
predraw and postdraw are node callbacks, with the node being a model.

predraw()
{
   glStartCounter();
}
postdraw()
{
   printf("The number of polygons in the model just drawn is %d\n", glStopCount());
}

pf stuff would be fine as well.

Thanks!

Christopher Dorosky
Staff Research Engineer - Real Time Simulation, TOPSCENE
Lockheed Martin Missiles and Fire Control - Dallas
christopher.g.dorosky++at++lmco.com
972-603-2349

-----------------------------------------------------------------------
   List Archives, Info, FAQ: http://www.sgi.com/software/performer/
   Open Development Project: http://oss.sgi.com/projects/performer/
                Submissions: info-performer++at++sgi.com
            Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------
              SIGGRAPH 2003 Friends of Performer Meeting:
  Wednesday July 30 6:00pm San Diego Hilton Hotel Santa Rosa Room
-----------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jul 22 2003 - 11:12:48 PDT