![]() |
OpenSceneGraph
|
Statistics base class. More...

Public Types | |
| enum | StatsType { STAT_NONE, STAT_FRAMERATE, STAT_GRAPHS, STAT_PRIMS, STAT_PRIMSPERVIEW, STAT_PRIMSPERBIN, STAT_DC, STAT_RESTART } |
| typedef std::pair< unsigned int, unsigned int > | PrimitivePair |
| typedef std::map< GLenum, PrimitivePair > | PrimitiveValueMap |
| typedef std::map< GLenum, unsigned int > | PrimitiveCountMap |
Public Member Functions | |
| Statistics () | |
| void | reset () |
| void | setType (StatsType t) |
| virtual void | setVertexArray (unsigned int count, const osg::Vec3 *) |
| Sets the array of vertices used to describe the primitives. More... | |
| virtual void | setVertexArray (unsigned int count, const osg::Vec2 *) |
| Sets the array of vertices used to describe the primitives. More... | |
| virtual void | setVertexArray (unsigned int count, const osg::Vec4 *) |
| Sets the array of vertices used to describe the primitives. More... | |
| virtual void | setVertexArray (unsigned int count, const osg::Vec3d *) |
| Sets the array of vertices used to describe the primitives. More... | |
| virtual void | setVertexArray (unsigned int count, const osg::Vec2d *) |
| Sets the array of vertices used to describe the primitives. More... | |
| virtual void | setVertexArray (unsigned int count, const osg::Vec4d *) |
| Sets the array of vertices used to describe the primitives. More... | |
| virtual void | drawArrays (GLenum mode, GLint, GLsizei count) |
Mimics the OpenGL glDrawArrays() function. More... | |
| virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *) |
Mimics the OpenGL glDrawElements() function. More... | |
| virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *) |
Mimics the OpenGL glDrawElements() function. More... | |
| virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *) |
Mimics the OpenGL glDrawElements() function. More... | |
| 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 | addFastDrawable () |
| void | addMatrix () |
| void | addLight (int np) |
| void | addImpostor (int np) |
| int | getBins () |
| void | setDepth (int d) |
| void | addBins (int np) |
| void | setBinNo (int n) |
| void | addStateGraphs (int n) |
| void | addOrderedLeaves (int n) |
| void | add (const Statistics &stats) |
| PrimitiveCountMap & | getPrimitiveCountMap () |
| const PrimitiveCountMap & | getPrimitiveCountMap () const |
| PrimitiveValueMap & | getPrimitiveValueMap () |
| const PrimitiveValueMap & | getPrimitiveValueMap () const |
| PrimitiveCountMap::iterator | GetPrimitivesBegin () |
| deprecated More... | |
| PrimitiveCountMap::iterator | GetPrimitivesEnd () |
| deprecated More... | |
Public Member Functions inherited from osg::PrimitiveFunctor | |
| virtual | ~PrimitiveFunctor () |
Public Attributes | |
| int | numDrawables |
| int | nummat |
| int | nbins |
| int | numStateGraphs |
| int | numFastDrawables |
| int | nlights |
| int | depth |
| int | _binNo |
| StatsType | stattype |
| int | nimpostor |
| int | numOrderedLeaves |
| unsigned int | _vertexCount |
| PrimitiveValueMap | _primitiveCount |
| GLenum | _currentPrimitiveFunctorMode |
Statistics base class.
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.
| typedef std::map<GLenum, unsigned int> osgUtil::Statistics::PrimitiveCountMap |
| typedef std::pair<unsigned int,unsigned int> osgUtil::Statistics::PrimitivePair |
| typedef std::map<GLenum,PrimitivePair> osgUtil::Statistics::PrimitiveValueMap |
| osgUtil::Statistics::Statistics | ( | ) |
| void osgUtil::Statistics::add | ( | const Statistics & | stats | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
|
virtual |
Mimics the OpenGL glDrawArrays() function.
Implements osg::PrimitiveFunctor.
|
virtual |
Mimics the OpenGL glDrawElements() function.
Implements osg::PrimitiveFunctor.
|
virtual |
Mimics the OpenGL glDrawElements() function.
Implements osg::PrimitiveFunctor.
|
virtual |
Mimics the OpenGL glDrawElements() function.
Implements osg::PrimitiveFunctor.
|
virtual |
|
inline |
|
inline |
|
inline |
|
inline |
deprecated
|
inline |
deprecated
|
inline |
|
inline |
| void osgUtil::Statistics::reset | ( | ) |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
| int osgUtil::Statistics::_binNo |
| GLenum osgUtil::Statistics::_currentPrimitiveFunctorMode |
| PrimitiveValueMap osgUtil::Statistics::_primitiveCount |
| unsigned int osgUtil::Statistics::_vertexCount |
| int osgUtil::Statistics::depth |
| int osgUtil::Statistics::nbins |
| int osgUtil::Statistics::nimpostor |
| int osgUtil::Statistics::nlights |
| int osgUtil::Statistics::numDrawables |
| int osgUtil::Statistics::numFastDrawables |
| int osgUtil::Statistics::nummat |
| int osgUtil::Statistics::numOrderedLeaves |
| int osgUtil::Statistics::numStateGraphs |
| StatsType osgUtil::Statistics::stattype |
1.8.13