|
Public Types |
typedef std::pair< unsigned
int, unsigned int > | PrimitivePair |
typedef std::map< GLenum,
PrimitivePair > | PrimitiveValueMap |
typedef std::map< GLenum,
unsigned int > | PrimitiveCountMap |
enum | statsType {
STAT_NONE,
STAT_FRAMERATE,
STAT_GRAPHS,
STAT_PRIMS,
STAT_PRIMSPERVIEW,
STAT_PRIMSPERBIN,
STAT_DC,
STAT_RESTART
} |
Public Member Functions |
| Statistics () |
void | reset () |
void | setType (statsType t) |
virtual void | setVertexArray (unsigned int count, const osg::Vec3 *) |
virtual void | setVertexArray (unsigned int count, const osg::Vec2 *) |
virtual void | setVertexArray (unsigned int count, const osg::Vec4 *) |
virtual void | drawArrays (GLenum mode, GLint, GLsizei count) |
virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *) |
virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *) |
virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *) |
virtual void | begin (GLenum mode) |
void | vertex () |
virtual void | vertex (float, float, float) |
virtual void | vertex (const osg::Vec3 &) |
virtual void | vertex (const osg::Vec2 &) |
virtual void | vertex (const osg::Vec4 &) |
virtual void | vertex (float, float) |
virtual void | vertex (float, float, float, float) |
virtual void | end () |
void | addDrawable () |
void | addMatrix () |
void | addLight (int np) |
void | addImpostor (int np) |
int | getBins () |
void | setDepth (int d) |
void | addBins (int np) |
void | setBinNo (int n) |
PrimitiveCountMap::iterator | GetPrimitivesBegin () |
PrimitiveCountMap::iterator | GetPrimitivesEnd () |
Public Attributes |
int | numDrawables |
int | nummat |
int | nbins |
int | nlights |
int | depth |
int | _binNo |
statsType | stattype |
int | nimpostor |
unsigned int | _vertexCount |
PrimitiveValueMap | _primitiveCount |
GLenum | _currentPrimitiveFunctorMode |
Used to extract primitive information from the renderBin(s). Add a case of getStats(osgUtil::Statistics *stat) for any new drawable (or drawable derived class) that you generate (eg see Geometry.cpp). There are 20 types of drawable counted - actually only 14 cases can occur in reality. these represent sets of GL_POINTS, GL_LINES GL_LINESTRIPS, LOOPS, TRIANGLES, TRI-fans, tristrips, quads, quadstrips etc The number of triangles rendered is inferred: each triangle = 1 triangle (number of vertices/3) each quad = 2 triangles (nverts/2) each trifan or tristrip = (length-2) triangles and so on.