Skip to content

Commit 69c17d7

Browse files
committed
Reverted statistics code for tracking number of lights in the scene. Not counting correctly. Maybe this can be added back in later on.
1 parent 0354f97 commit 69c17d7

2 files changed

Lines changed: 12 additions & 35 deletions

File tree

jme3-core/src/main/java/com/jme3/renderer/RenderManager.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,8 @@
3434
import com.jme3.light.DefaultLightFilter;
3535
import com.jme3.light.LightFilter;
3636
import com.jme3.light.LightList;
37-
import com.jme3.material.Material;
38-
import com.jme3.material.MaterialDef;
39-
import com.jme3.material.RenderState;
40-
import com.jme3.material.Technique;
41-
import com.jme3.material.TechniqueDef;
42-
import com.jme3.math.*;
37+
import com.jme3.material.*;
38+
import com.jme3.math.Matrix4f;
4339
import com.jme3.post.SceneProcessor;
4440
import com.jme3.profile.AppProfiler;
4541
import com.jme3.profile.AppStep;
@@ -55,6 +51,7 @@
5551
import com.jme3.system.NullRenderer;
5652
import com.jme3.system.Timer;
5753
import com.jme3.util.SafeArrayList;
54+
5855
import java.util.ArrayList;
5956
import java.util.Collections;
6057
import java.util.List;
@@ -534,9 +531,6 @@ public void renderGeometry(Geometry g) {
534531
lightList = filteredLightList;
535532
}
536533

537-
// Report the number of lights we're about to render to the statistics.
538-
renderer.getStatistics().onLights(lightList.size());
539-
540534
//if forcedTechnique we try to force it for render,
541535
//if it does not exists in the mat def, we check for forcedMaterial and render the geom if not null
542536
//else the geom is not rendered

jme3-core/src/main/java/com/jme3/renderer/Statistics.java

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public class Statistics {
4949
protected boolean enabled = false;
5050

5151
protected int numObjects;
52-
protected int numLights;
5352
protected int numTriangles;
5453
protected int numVertices;
5554
protected int numShaderSwitches;
@@ -80,7 +79,6 @@ public String[] getLabels(){
8079
"Uniforms",
8180

8281
"Objects",
83-
"Lights",
8482

8583
"Shaders (S)",
8684
"Shaders (F)",
@@ -108,19 +106,18 @@ public void getData(int[] data){
108106
data[1] = numTriangles;
109107
data[2] = numUniformsSet;
110108
data[3] = numObjects;
111-
data[4] = numLights;
112109

113-
data[5] = numShaderSwitches;
114-
data[6] = shadersUsed.size();
115-
data[7] = memoryShaders;
110+
data[4] = numShaderSwitches;
111+
data[5] = shadersUsed.size();
112+
data[6] = memoryShaders;
116113

117-
data[8] = numTextureBinds;
118-
data[9] = texturesUsed.size();
119-
data[10] = memoryTextures;
114+
data[7] = numTextureBinds;
115+
data[8] = texturesUsed.size();
116+
data[9] = memoryTextures;
120117

121-
data[11] = numFboSwitches;
122-
data[12] = fbosUsed.size();
123-
data[13] = memoryFrameBuffers;
118+
data[10] = numFboSwitches;
119+
data[11] = fbosUsed.size();
120+
data[12] = memoryFrameBuffers;
124121
}
125122

126123
/**
@@ -225,7 +222,6 @@ public void clearFrame(){
225222
fbosUsed.clear();
226223

227224
numObjects = 0;
228-
numLights = 0;
229225
numTriangles = 0;
230226
numVertices = 0;
231227
numShaderSwitches = 0;
@@ -290,19 +286,6 @@ public void onDeleteFrameBuffer(){
290286
memoryFrameBuffers --;
291287
}
292288

293-
/**
294-
* Called by the RenderManager once filtering has happened.
295-
*
296-
* @param lightCount the number of lights which will be passed to the materials for inclusion in rendering.
297-
*/
298-
public void onLights(final int lightCount) {
299-
if (!enabled) {
300-
return;
301-
}
302-
303-
numLights += lightCount;
304-
}
305-
306289
/**
307290
* Called when video memory is cleared.
308291
*/

0 commit comments

Comments
 (0)