Reverted statistics code for tracking number of lights in the scene. Not counting correctly. Maybe this can be added back in later on.

cleanup_build_scripts
Daniel Johansson 9 years ago
parent 0354f976e9
commit 69c17d72c8
  1. 12
      jme3-core/src/main/java/com/jme3/renderer/RenderManager.java
  2. 35
      jme3-core/src/main/java/com/jme3/renderer/Statistics.java

@ -34,12 +34,8 @@ package com.jme3.renderer;
import com.jme3.light.DefaultLightFilter;
import com.jme3.light.LightFilter;
import com.jme3.light.LightList;
import com.jme3.material.Material;
import com.jme3.material.MaterialDef;
import com.jme3.material.RenderState;
import com.jme3.material.Technique;
import com.jme3.material.TechniqueDef;
import com.jme3.math.*;
import com.jme3.material.*;
import com.jme3.math.Matrix4f;
import com.jme3.post.SceneProcessor;
import com.jme3.profile.AppProfiler;
import com.jme3.profile.AppStep;
@ -55,6 +51,7 @@ import com.jme3.shader.UniformBindingManager;
import com.jme3.system.NullRenderer;
import com.jme3.system.Timer;
import com.jme3.util.SafeArrayList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -534,9 +531,6 @@ public class RenderManager {
lightList = filteredLightList;
}
// Report the number of lights we're about to render to the statistics.
renderer.getStatistics().onLights(lightList.size());
//if forcedTechnique we try to force it for render,
//if it does not exists in the mat def, we check for forcedMaterial and render the geom if not null
//else the geom is not rendered

@ -49,7 +49,6 @@ public class Statistics {
protected boolean enabled = false;
protected int numObjects;
protected int numLights;
protected int numTriangles;
protected int numVertices;
protected int numShaderSwitches;
@ -80,7 +79,6 @@ public class Statistics {
"Uniforms",
"Objects",
"Lights",
"Shaders (S)",
"Shaders (F)",
@ -108,19 +106,18 @@ public class Statistics {
data[1] = numTriangles;
data[2] = numUniformsSet;
data[3] = numObjects;
data[4] = numLights;
data[5] = numShaderSwitches;
data[6] = shadersUsed.size();
data[7] = memoryShaders;
data[4] = numShaderSwitches;
data[5] = shadersUsed.size();
data[6] = memoryShaders;
data[8] = numTextureBinds;
data[9] = texturesUsed.size();
data[10] = memoryTextures;
data[7] = numTextureBinds;
data[8] = texturesUsed.size();
data[9] = memoryTextures;
data[11] = numFboSwitches;
data[12] = fbosUsed.size();
data[13] = memoryFrameBuffers;
data[10] = numFboSwitches;
data[11] = fbosUsed.size();
data[12] = memoryFrameBuffers;
}
/**
@ -225,7 +222,6 @@ public class Statistics {
fbosUsed.clear();
numObjects = 0;
numLights = 0;
numTriangles = 0;
numVertices = 0;
numShaderSwitches = 0;
@ -290,19 +286,6 @@ public class Statistics {
memoryFrameBuffers --;
}
/**
* Called by the RenderManager once filtering has happened.
*
* @param lightCount the number of lights which will be passed to the materials for inclusion in rendering.
*/
public void onLights(final int lightCount) {
if (!enabled) {
return;
}
numLights += lightCount;
}
/**
* Called when video memory is cleared.
*/

Loading…
Cancel
Save