From 22957c3d28a00a20533f1b45d271b4229f6f52cb Mon Sep 17 00:00:00 2001 From: shadowislord Date: Fri, 27 Mar 2015 22:20:38 -0400 Subject: [PATCH] IOS Renderer: remove clear texture units (does nothing anyway) --- .../renderer/ios/IGLESShaderRenderer.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/jme3-ios/src/main/java/com/jme3/renderer/ios/IGLESShaderRenderer.java b/jme3-ios/src/main/java/com/jme3/renderer/ios/IGLESShaderRenderer.java index d6b7010f4..8a59d0be8 100644 --- a/jme3-ios/src/main/java/com/jme3/renderer/ios/IGLESShaderRenderer.java +++ b/jme3-ios/src/main/java/com/jme3/renderer/ios/IGLESShaderRenderer.java @@ -759,14 +759,6 @@ public class IGLESShaderRenderer implements Renderer { Image[] textures = context.boundTextures; int type = convertTextureType(tex.getType()); - if (!context.textureIndexList.moveToNew(unit)) { -// if (context.boundTextureUnit != unit){ -// glActiveTexture(GL_TEXTURE0 + unit); -// context.boundTextureUnit = unit; -// } -// glEnable(type); - } - if (textures[unit] != image) { if (context.boundTextureUnit != unit) { JmeIosGLES.glActiveTexture(JmeIosGLES.GL_TEXTURE0 + unit); @@ -1768,7 +1760,6 @@ public class IGLESShaderRenderer implements Renderer { JmeIosGLES.checkGLError(); } clearVertexAttribs(); - clearTextureUnits(); } private void renderMeshDefault(Mesh mesh, int lod, int count) { @@ -1807,7 +1798,6 @@ public class IGLESShaderRenderer implements Renderer { JmeIosGLES.checkGLError(); } clearVertexAttribs(); - clearTextureUnits(); } @@ -2085,23 +2075,6 @@ public class IGLESShaderRenderer implements Renderer { context.attribIndexList.copyNewToOld(); } - - public void clearTextureUnits() { - IDList textureList = context.textureIndexList; - Image[] textures = context.boundTextures; - for (int i = 0; i < textureList.oldLen; i++) { - int idx = textureList.oldList[i]; -// if (context.boundTextureUnit != idx){ -// glActiveTexture(GL_TEXTURE0 + idx); -// context.boundTextureUnit = idx; -// } -// glDisable(convertTextureType(textures[idx].getType())); - textures[idx] = null; - } - context.textureIndexList.copyNewToOld(); - } - - public void updateFrameBuffer(FrameBuffer fb) { int id = fb.getId(); if (id == -1) {