IOS Renderer: remove clear texture units (does nothing anyway)

experimental
shadowislord 10 years ago
parent 26109fcbac
commit 22957c3d28
  1. 27
      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) {

Loading…
Cancel
Save