From f55a277cd9f2132cfa77cc0a046e63d0878ef7f1 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 26 Nov 2011 01:51:32 +0000 Subject: [PATCH] - remove unnecessary checks in RenderQueue.renderGeometryList() git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8801 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../core/com/jme3/renderer/queue/RenderQueue.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/engine/src/core/com/jme3/renderer/queue/RenderQueue.java b/engine/src/core/com/jme3/renderer/queue/RenderQueue.java index 119adfcff..dba604ee2 100644 --- a/engine/src/core/com/jme3/renderer/queue/RenderQueue.java +++ b/engine/src/core/com/jme3/renderer/queue/RenderQueue.java @@ -294,16 +294,10 @@ public class RenderQueue { list.setCamera(cam); // select camera for sorting list.sort(); for (int i = 0; i < list.size(); i++) { - Spatial obj = list.get(i); + Geometry obj = list.get(i); assert obj != null; - if (obj instanceof Geometry) { - Geometry g = (Geometry) obj; - rm.renderGeometry(g); - // make sure to reset queue distance - } - if (obj != null) { - obj.queueDistance = Float.NEGATIVE_INFINITY; - } + rm.renderGeometry(obj); + obj.queueDistance = Float.NEGATIVE_INFINITY; } if (clear) { list.clear();