Display rendered objects count instead of ktris.
Things go well untill we have more than 200 objects on my system, no matter how big they are.
This commit is contained in:
parent
f1f8900c5d
commit
143e3a355d
@ -152,6 +152,11 @@ STKRenderingPass IrrDriver::getPhase() const
|
||||
return phase;
|
||||
}
|
||||
|
||||
void IrrDriver::IncreaseObjectCount()
|
||||
{
|
||||
object_count[phase]++;
|
||||
}
|
||||
|
||||
core::array<video::IRenderTarget> &IrrDriver::getMainSetup()
|
||||
{
|
||||
return m_mrt;
|
||||
@ -1514,8 +1519,9 @@ void IrrDriver::displayFPS()
|
||||
|
||||
if (UserConfigParams::m_artist_debug_mode)
|
||||
{
|
||||
sprintf(buffer, "FPS: %i/%i/%i - %.2f/%.2f/%.2f KTris - LightDst : ~%d",
|
||||
min, fps, max, low, kilotris, high, m_last_light_bucket_distance);
|
||||
sprintf(buffer, "FPS: %i/%i/%i - Objects (P1:%d P2:%d T:%d) KTris - LightDst : ~%d",
|
||||
min, fps, max, object_count[SOLID_NORMAL_AND_DEPTH_PASS], object_count[SOLID_NORMAL_AND_DEPTH_PASS], object_count[TRANSPARENT_PASS], m_last_light_bucket_distance);
|
||||
object_count[SOLID_NORMAL_AND_DEPTH_PASS] = object_count[SOLID_NORMAL_AND_DEPTH_PASS] = object_count[TRANSPARENT_PASS] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -70,7 +70,8 @@ enum STKRenderingPass
|
||||
TRANSPARENT_PASS,
|
||||
GLOW_PASS,
|
||||
DISPLACEMENT_PASS,
|
||||
SHADOW_PASS
|
||||
SHADOW_PASS,
|
||||
PASS_COUNT,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -164,7 +165,9 @@ private:
|
||||
bool m_shadowviz;
|
||||
bool m_lightviz;
|
||||
bool m_distortviz;
|
||||
/** Performance stats */
|
||||
unsigned m_last_light_bucket_distance;
|
||||
unsigned object_count[PASS_COUNT];
|
||||
u32 m_renderpass;
|
||||
u32 m_lensflare_query;
|
||||
scene::IMeshSceneNode *m_sun_interposer;
|
||||
@ -223,6 +226,7 @@ public:
|
||||
void reset();
|
||||
void setPhase(STKRenderingPass);
|
||||
STKRenderingPass getPhase() const;
|
||||
void IncreaseObjectCount();
|
||||
core::array<video::IRenderTarget> &getMainSetup();
|
||||
void updateConfigIfRelevant();
|
||||
void setAllMaterialFlags(scene::IMesh *mesh) const;
|
||||
|
@ -160,6 +160,7 @@ void STKAnimatedMesh::render()
|
||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation * ((scene::SSkinMeshBuffer*)mb)->Transformation);
|
||||
if (isObjectPass(material.MaterialType))
|
||||
{
|
||||
irr_driver->IncreaseObjectCount();
|
||||
initvaostate(GLmeshes[i], material.MaterialType);
|
||||
if (irr_driver->getPhase() == SOLID_NORMAL_AND_DEPTH_PASS)
|
||||
{
|
||||
|
@ -949,6 +949,7 @@ void STKMesh::render()
|
||||
}
|
||||
else
|
||||
{
|
||||
irr_driver->IncreaseObjectCount();
|
||||
initvaostate(GLmeshes[i], material.MaterialType);
|
||||
if (transparent)
|
||||
drawTransparent(GLmeshes[i], material.MaterialType);
|
||||
|
Loading…
Reference in New Issue
Block a user