From Roland Smeenk, "this submission adds a "Fast Drawable" line to the camera scene statistics.

It shows the total number of sorted and unsorted drawables that use the fastpath for rendering."
This commit is contained in:
Robert Osfield
2010-09-09 10:03:58 +00:00
parent 77c35eabde
commit cbc43841e1
5 changed files with 25 additions and 2 deletions

View File

@@ -535,6 +535,14 @@ bool RenderBin::getStats(Statistics& stats) const
const RenderLeaf* rl = *dw_itr;
const Drawable* dw= rl->getDrawable();
stats.addDrawable(); // number of geosets
const Geometry* geom = dw->asGeometry();
if (geom)
{
if (geom->areFastPathsUsed())
stats.addFastDrawable();
}
if (rl->_modelview.get())
{
stats.addMatrix(); // number of matrices
@@ -560,6 +568,14 @@ bool RenderBin::getStats(Statistics& stats) const
const RenderLeaf* rl = dw_itr->get();
const Drawable* dw= rl->getDrawable();
stats.addDrawable(); // number of geosets
const Geometry* geom = dw->asGeometry();
if (geom)
{
if (geom->areFastPathsUsed())
stats.addFastDrawable();
}
if (rl->_modelview.get()) stats.addMatrix(); // number of matrices
if (dw)
{

View File

@@ -37,6 +37,7 @@ Statistics::Statistics()
void Statistics::reset()
{
numDrawables=0;
numFastDrawables=0;
nummat=0;
depth=0;
stattype=STAT_NONE;
@@ -108,6 +109,7 @@ void Statistics::end()
void Statistics::add(const Statistics& stats)
{
numDrawables += stats.numDrawables;
numFastDrawables += stats.numFastDrawables;
nummat += stats.nummat;
depth += stats.depth;
nlights += stats.nlights;