OpenSceneGraph 2.8.3
|
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. | |
virtual void | setVertexArray (unsigned int count, const osg::Vec2 *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const osg::Vec4 *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const osg::Vec3d *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const osg::Vec2d *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const osg::Vec4d *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | drawArrays (GLenum mode, GLint, GLsizei count) |
Mimics the OpenGL glDrawArrays() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *) |
Mimics the OpenGL glDrawElements() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *) |
Mimics the OpenGL glDrawElements() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *) |
Mimics the OpenGL glDrawElements() function. | |
virtual void | begin (GLenum mode) |
Mimics the OpenGL glBegin() function. | |
void | vertex () |
virtual void | vertex (float, float, float) |
Mimics the OpenGL glVertex() "family of functions". | |
virtual void | vertex (const osg::Vec3 &) |
Mimics the OpenGL glVertex() "family of functions". | |
virtual void | vertex (const osg::Vec2 &) |
Mimics the OpenGL glVertex() "family of functions". | |
virtual void | vertex (const osg::Vec4 &) |
Mimics the OpenGL glVertex() "family of functions". | |
virtual void | vertex (float, float) |
Mimics the OpenGL glVertex() "family of functions". | |
virtual void | vertex (float, float, float, float) |
Mimics the OpenGL glVertex() "family of functions". | |
virtual void | end () |
Mimics the OpenGL glEnd() function. | |
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) |
void | add (const Statistics &stats) |
PrimitiveCountMap & | getPrimitiveCountMap () |
const PrimitiveCountMap & | getPrimitiveCountMap () const |
PrimitiveCountMap::iterator | GetPrimitivesBegin () |
deprecated | |
PrimitiveCountMap::iterator | GetPrimitivesEnd () |
deprecated | |
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 |
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 | ) |
void osgUtil::Statistics::addBins | ( | int | np | ) | [inline] |
void osgUtil::Statistics::addDrawable | ( | ) | [inline] |
void osgUtil::Statistics::addImpostor | ( | int | np | ) | [inline] |
void osgUtil::Statistics::addLight | ( | int | np | ) | [inline] |
void osgUtil::Statistics::addMatrix | ( | ) | [inline] |
virtual void osgUtil::Statistics::begin | ( | GLenum | mode | ) | [virtual] |
Mimics the OpenGL glBegin()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::drawArrays | ( | GLenum | mode, |
GLint | first, | ||
GLsizei | count | ||
) | [virtual] |
Mimics the OpenGL glDrawArrays()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::drawElements | ( | GLenum | mode, |
GLsizei | count, | ||
const GLubyte * | indices | ||
) | [virtual] |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::drawElements | ( | GLenum | mode, |
GLsizei | count, | ||
const GLushort * | indices | ||
) | [virtual] |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::drawElements | ( | GLenum | mode, |
GLsizei | count, | ||
const GLuint * | indices | ||
) | [virtual] |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::end | ( | ) | [virtual] |
Mimics the OpenGL glEnd()
function.
Implements osg::PrimitiveFunctor.
int osgUtil::Statistics::getBins | ( | ) | [inline] |
const PrimitiveCountMap& osgUtil::Statistics::getPrimitiveCountMap | ( | ) | const [inline] |
PrimitiveCountMap& osgUtil::Statistics::getPrimitiveCountMap | ( | ) | [inline] |
PrimitiveCountMap::iterator osgUtil::Statistics::GetPrimitivesBegin | ( | ) | [inline] |
deprecated
PrimitiveCountMap::iterator osgUtil::Statistics::GetPrimitivesEnd | ( | ) | [inline] |
deprecated
void osgUtil::Statistics::reset | ( | ) |
void osgUtil::Statistics::setBinNo | ( | int | n | ) | [inline] |
void osgUtil::Statistics::setDepth | ( | int | d | ) | [inline] |
void osgUtil::Statistics::setType | ( | StatsType | t | ) | [inline] |
virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count, |
const osg::Vec2d * | vertices | ||
) | [inline, virtual] |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count, |
const osg::Vec2 * | vertices | ||
) | [inline, virtual] |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count, |
const osg::Vec4 * | vertices | ||
) | [inline, virtual] |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count, |
const osg::Vec3 * | vertices | ||
) | [inline, virtual] |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count, |
const osg::Vec3d * | vertices | ||
) | [inline, virtual] |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count, |
const osg::Vec4d * | vertices | ||
) | [inline, virtual] |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
virtual void osgUtil::Statistics::vertex | ( | const osg::Vec4 & | vert | ) | [inline, virtual] |
Mimics the OpenGL glVertex()
"family of functions".
Implements osg::PrimitiveFunctor.
References vertex().
Referenced by vertex().
virtual void osgUtil::Statistics::vertex | ( | float | x, |
float | y | ||
) | [inline, virtual] |
Mimics the OpenGL glVertex()
"family of functions".
Implements osg::PrimitiveFunctor.
References vertex().
Referenced by vertex().
virtual void osgUtil::Statistics::vertex | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) | [inline, virtual] |
Mimics the OpenGL glVertex()
"family of functions".
Implements osg::PrimitiveFunctor.
References vertex().
Referenced by vertex().
virtual void osgUtil::Statistics::vertex | ( | const osg::Vec2 & | vert | ) | [inline, virtual] |
Mimics the OpenGL glVertex()
"family of functions".
Implements osg::PrimitiveFunctor.
References vertex().
Referenced by vertex().
virtual void osgUtil::Statistics::vertex | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline, virtual] |
Mimics the OpenGL glVertex()
"family of functions".
Implements osg::PrimitiveFunctor.
References vertex().
Referenced by vertex().
void osgUtil::Statistics::vertex | ( | ) | [inline] |
virtual void osgUtil::Statistics::vertex | ( | const osg::Vec3 & | vert | ) | [inline, virtual] |
Mimics the OpenGL glVertex()
"family of functions".
Implements osg::PrimitiveFunctor.
References vertex().
Referenced by vertex().
unsigned int osgUtil::Statistics::_vertexCount |
![]() | Generated at Tue Mar 22 2011 13:20:30 for the OpenSceneGraph by doxygen 1.7.3. |