including review feedback

This commit is contained in:
Sam Gateau 2018-08-30 22:26:45 -07:00
parent 969d16262f
commit 764f75c340
2 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ void LODManager::autoAdjustLOD(float realTimeDelta) {
float smoothBlend = (realTimeDelta < LOD_ADJUST_RUNNING_AVG_TIMESCALE * _smoothScale) ? realTimeDelta / (LOD_ADJUST_RUNNING_AVG_TIMESCALE * _smoothScale) : 1.0f;
_smoothRenderTime = (1.0f - smoothBlend) * _smoothRenderTime + smoothBlend * maxRenderTime; // msec
if (!_automaticLODAdjust || _nowRenderTime == 0.0f) {
if (!_automaticLODAdjust || _nowRenderTime == 0.0f || _smoothRenderTime == 0.0f) {
// early exit
return;
}

View file

@ -173,13 +173,13 @@ public:
void resetLODAdjust();
float getNowRenderTime() const { return _nowRenderTime; };
float getNowRenderFPS() const { return (float)MSECS_PER_SECOND / _nowRenderTime; };
float getNowRenderFPS() const { return (_nowRenderTime > 0.0f ? (float)MSECS_PER_SECOND / _nowRenderTime : 0.0f); };
void setSmoothScale(float t);
float getSmoothScale() const { return _smoothScale; }
float getSmoothRenderTime() const { return _smoothRenderTime; };
float getSmoothRenderFPS() const { return (float)MSECS_PER_SECOND / _smoothRenderTime; };
float getSmoothRenderFPS() const { return (_smoothRenderTime > 0.0f ? (float)MSECS_PER_SECOND / _smoothRenderTime : 0.0f); };
void setWorldDetailQuality(float quality);
float getWorldDetailQuality() const;