Program: 81179
Project: 81179
Buggy source:
private void renderScene(){
  Gdx.gl.glEnable(GL20.GL_CULL_FACE);
  Gdx.gl20.glEnable(GL20.GL_BLEND);
  Gdx.gl20.glBlendFunc(GL20.GL_SRC_ALPHA,GL20.GL_ONE_MINUS_SRC_ALPHA);
  Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
  transShader.begin();
  transShader.setUniformMatrix("String_Node_Str",cam.combined);
{
    tmp.idt();
    model.idt();
    tmp.setToScaling(20.5f,20.5f,20.5f);
    model.mul(tmp);
    tmp.setToRotation(Vector3.X,angleX + angleXBack);
    model.mul(tmp);
    tmp.setToRotation(Vector3.Y,angleY + angleYBack);
    model.mul(tmp);
    tmp.setToTranslation(0,0,0);
    model.mul(tmp);
    transShader.setUniformMatrix("String_Node_Str",model);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().backgroundWireColor[0],Resources.getInstance().backgroundWireColor[1],Resources.getInstance().backgroundWireColor[2],Resources.getInstance().backgroundWireColor[3]);
    playerModel.render(transShader,GL20.GL_LINE_STRIP);
  }
{
    tmp.idt();
    model.idt();
    tmp.setToScaling(5.5f,5.5f,5.5f);
    model.mul(tmp);
    tmp.setToRotation(Vector3.X,angleX);
    model.mul(tmp);
    tmp.setToRotation(Vector3.Y,angleY);
    model.mul(tmp);
    tmp.setToTranslation(0,0,0);
    model.mul(tmp);
    transShader.setUniformMatrix("String_Node_Str",model);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().clearColor[0],Resources.getInstance().clearColor[1],Resources.getInstance().clearColor[2],Resources.getInstance().clearColor[3]);
    blockModel.render(transShader,GL20.GL_TRIANGLES);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().wireCubeEdgeColor[0],Resources.getInstance().wireCubeEdgeColor[1],Resources.getInstance().wireCubeEdgeColor[2],Resources.getInstance().wireCubeEdgeColor[3]);
    wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
  }
  if (mode == 0) {
    if (player != null) {
      pRay.set(player.position,player.direction);
      float oldDst=1111f;
      nextBlock=new Renderable();
      for (      Renderable renderable : renderObjects) {
        if (!(renderable instanceof Player) && !(renderable instanceof Switch)) {
          boolean intersect=Intersector.intersectRaySphere(pRay,renderable.position,1f,intersection);
          float dst=intersection.dst(player.position);
          if (dst < oldDst && intersect) {
            nextBlock=renderable;
            oldDst=dst;
          }
          renderable.isHighlightAnimation=false;
        }
      }
      if (oldDst > 1.0f && nextBlock != null) {
        nextBlock.isHighlightAnimation=true;
      }
    }
  }
  for (int i=0; i < renderObjects.size; ++i) {
    if (mode == 1 && renderObjects.get(i) instanceof EditorBlock) {
      model.set(renderObjects.get(i).model);
      transShader.setUniformMatrix("String_Node_Str",model);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().editorBlockColor[0],Resources.getInstance().editorBlockColor[1],Resources.getInstance().editorBlockColor[2],Resources.getInstance().editorBlockColor[3] + renderObjects.get(i).collideAnimation);
      blockModel.render(transShader,GL20.GL_TRIANGLES);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().editorBlockEdgeColor[0],Resources.getInstance().editorBlockEdgeColor[1],Resources.getInstance().editorBlockEdgeColor[2],Resources.getInstance().editorBlockEdgeColor[3] + renderObjects.get(i).collideAnimation);
      wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
    }
    if (renderObjects.get(i).isCollidedAnimation == true && renderObjects.get(i).collideAnimation == 0) {
      renderObjects.get(i).collideAnimation=1.0f;
    }
    if (renderObjects.get(i).collideAnimation > 0.0f) {
      renderObjects.get(i).collideAnimation-=delta * 1.f;
      renderObjects.get(i).collideAnimation=Math.max(0.0f,renderObjects.get(i).collideAnimation);
      if (renderObjects.get(i).collideAnimation == 0.0f)       renderObjects.get(i).isCollidedAnimation=false;
    }
    if (renderObjects.get(i).isHighlightAnimation == true && renderObjects.get(i).isHighlightAnimationFadeInOut) {
      renderObjects.get(i).highlightAnimation+=delta / 6.f;
      renderObjects.get(i).highlightAnimation=Math.min(0.5f,renderObjects.get(i).highlightAnimation);
      if (renderObjects.get(i).highlightAnimation >= 0.5) {
        renderObjects.get(i).isHighlightAnimationFadeInOut=!renderObjects.get(i).isHighlightAnimationFadeInOut;
      }
    }
    if (renderObjects.get(i).isHighlightAnimation == true && !renderObjects.get(i).isHighlightAnimationFadeInOut) {
      renderObjects.get(i).highlightAnimation-=delta / 6.f;
      renderObjects.get(i).highlightAnimation=Math.max(0.0f,renderObjects.get(i).highlightAnimation);
      if (renderObjects.get(i).highlightAnimation <= 0) {
        renderObjects.get(i).isHighlightAnimationFadeInOut=!renderObjects.get(i).isHighlightAnimationFadeInOut;
      }
    }
    if (renderObjects.get(i).isHighlightAnimation == false) {
      renderObjects.get(i).highlightAnimation-=delta / 1.f;
      renderObjects.get(i).highlightAnimation=Math.max(0.0f,renderObjects.get(i).highlightAnimation);
      if (renderObjects.get(i).highlightAnimation <= 0) {
        renderObjects.get(i).isHighlightAnimationFadeInOut=!renderObjects.get(i).isHighlightAnimationFadeInOut;
      }
    }
    if (renderObjects.get(i) instanceof SwitchableBlock) {
      if (((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true && ((SwitchableBlock)renderObjects.get(i)).isSwitched == true && ((SwitchableBlock)renderObjects.get(i)).switchAnimation == 0) {
        ((SwitchableBlock)renderObjects.get(i)).switchAnimation=0.0f;
      }
      if (((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true && ((SwitchableBlock)renderObjects.get(i)).isSwitched == false && ((SwitchableBlock)renderObjects.get(i)).switchAnimation == 1) {
        ((SwitchableBlock)renderObjects.get(i)).switchAnimation=1.0f;
      }
      if (((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true) {
        if (!((SwitchableBlock)renderObjects.get(i)).isSwitched) {
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation-=delta * 1.f;
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation=Math.max(0.0f,((SwitchableBlock)renderObjects.get(i)).switchAnimation);
          if (((SwitchableBlock)renderObjects.get(i)).switchAnimation == 0.0f)           ((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation=false;
        }
 else {
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation+=delta * 1.f;
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation=Math.min(1.0f,((SwitchableBlock)renderObjects.get(i)).switchAnimation);
          if (((SwitchableBlock)renderObjects.get(i)).switchAnimation == 1.0f)           ((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation=false;
        }
      }
    }
    if (renderObjects.get(i) instanceof Block) {
      model.set(renderObjects.get(i).model);
      transShader.setUniformMatrix("String_Node_Str",model);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().blockColor[0],Resources.getInstance().blockColor[1],Resources.getInstance().blockColor[2],Resources.getInstance().blockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      blockModel.render(transShader,GL20.GL_TRIANGLES);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().blockEdgeColor[0],Resources.getInstance().blockEdgeColor[1],Resources.getInstance().blockEdgeColor[2],Resources.getInstance().blockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
    }
    if (renderObjects.get(i) instanceof MovableBlock) {
      model.set(renderObjects.get(i).model);
      transShader.setUniformMatrix("String_Node_Str",model);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().movableBlockColor[0],Resources.getInstance().movableBlockColor[1],Resources.getInstance().movableBlockColor[2],Resources.getInstance().movableBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().movableBlockEdgeColor[0],Resources.getInstance().movableBlockEdgeColor[1],Resources.getInstance().movableBlockEdgeColor[2],Resources.getInstance().movableBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      blockModel.render(transShader,GL20.GL_TRIANGLES);
    }
    if (renderObjects.get(i) instanceof SwitchableBlock) {
      if (!((SwitchableBlock)renderObjects.get(i)).isSwitched || ((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true) {
        model.set(renderObjects.get(i).model);
        SwitchableBlock tmpSwitchb=(SwitchableBlock)renderObjects.get(i);
switch (Math.abs(tmpSwitchb.id)) {
case 10:
          tmp.setToScaling(0.3f,0.3f,0.3f);
        model.mul(tmp);
      transShader.setUniformMatrix("String_Node_Str",model);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
  playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 12:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 13:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
coneModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
default :
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
}
}
}
if (renderObjects.get(i) instanceof Switch) {
model.set(renderObjects.get(i).model);
Switch tmpSwitch=(Switch)renderObjects.get(i);
switch (Math.abs(tmpSwitch.id)) {
case 10:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 12:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 13:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
coneModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
default :
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
}
}
if (renderObjects.get(i) instanceof Player) {
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXBack);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYBack);
model.mul(tmp);
tmp.setToScaling(0.5f,0.5f,0.5f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().playerColor[0],Resources.getInstance().playerColor[1],Resources.getInstance().playerColor[2],Resources.getInstance().playerColor[3] + renderObjects.get(i).collideAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f - (renderObjects.get(i).collideAnimation),2.0f - (renderObjects.get(i).collideAnimation),2.0f - (renderObjects.get(i).collideAnimation));
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().playerEdgeColor[0],Resources.getInstance().playerEdgeColor[1],Resources.getInstance().playerEdgeColor[2],Resources.getInstance().playerEdgeColor[3] + renderObjects.get(i).collideAnimation);
playerModel.render(transShader,GL20.GL_LINE_STRIP);
playerModel.render(transShader,GL20.GL_LINE_STRIP,0,(int)(playerModel.getNumVertices() - (renderObjects.get(i).collideAnimation * playerModel.getNumVertices())));
}
if (renderObjects.get(i) instanceof Portal) {
if (renderObjects.get(i).position.x != -11) {
Portal tmpPortal=(Portal)renderObjects.get(i);
switch (Math.abs(tmpPortal.id)) {
case 4:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 5:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor2[0],Resources.getInstance().portalColor2[1],Resources.getInstance().portalColor2[2],Resources.getInstance().portalColor2[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor2[0],Resources.getInstance().portalColor2[1],Resources.getInstance().portalColor2[2],Resources.getInstance().portalColor2[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 6:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor3[0],Resources.getInstance().portalColor3[1],Resources.getInstance().portalColor3[2],Resources.getInstance().portalColor3[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor3[0],Resources.getInstance().portalColor3[1],Resources.getInstance().portalColor3[2],Resources.getInstance().portalColor3[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 7:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor4[0],Resources.getInstance().portalColor4[1],Resources.getInstance().portalColor4[2],Resources.getInstance().portalColor4[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor4[0],Resources.getInstance().portalColor4[1],Resources.getInstance().portalColor4[2],Resources.getInstance().portalColor4[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 8:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor5[0],Resources.getInstance().portalColor5[1],Resources.getInstance().portalColor5[2],Resources.getInstance().portalColor5[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor5[0],Resources.getInstance().portalColor5[1],Resources.getInstance().portalColor5[2],Resources.getInstance().portalColor5[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
default :
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
}
}
}
if (renderObjects.get(i) instanceof Target) {
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.Y,angleY + angleYBack);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().targetColor[0],Resources.getInstance().targetColor[1],Resources.getInstance().targetColor[2],Resources.getInstance().targetColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
targetModel.render(transShader,GL20.GL_TRIANGLES);
transShader.setUniformf("String_Node_Str",Resources.getInstance().targetEdgeColor[0],Resources.getInstance().targetEdgeColor[1],Resources.getInstance().targetEdgeColor[2],Resources.getInstance().targetEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
targetModel.render(transShader,GL20.GL_LINE_STRIP);
}
}
transShader.end();
}

Fixed version (ground truth):
private void renderScene(){
  Gdx.gl.glEnable(GL20.GL_CULL_FACE);
  Gdx.gl20.glEnable(GL20.GL_BLEND);
  Gdx.gl20.glBlendFunc(GL20.GL_SRC_ALPHA,GL20.GL_ONE_MINUS_SRC_ALPHA);
  Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
  transShader.begin();
  transShader.setUniformMatrix("String_Node_Str",cam.combined);
{
    tmp.idt();
    model.idt();
    tmp.setToScaling(20.5f,20.5f,20.5f);
    model.mul(tmp);
    tmp.setToRotation(Vector3.X,angleX + angleXBack);
    model.mul(tmp);
    tmp.setToRotation(Vector3.Y,angleY + angleYBack);
    model.mul(tmp);
    tmp.setToTranslation(0,0,0);
    model.mul(tmp);
    transShader.setUniformMatrix("String_Node_Str",model);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().backgroundWireColor[0],Resources.getInstance().backgroundWireColor[1],Resources.getInstance().backgroundWireColor[2],Resources.getInstance().backgroundWireColor[3]);
    playerModel.render(transShader,GL20.GL_LINE_STRIP);
  }
{
    tmp.idt();
    model.idt();
    tmp.setToScaling(5.5f,5.5f,5.5f);
    model.mul(tmp);
    tmp.setToRotation(Vector3.X,angleX);
    model.mul(tmp);
    tmp.setToRotation(Vector3.Y,angleY);
    model.mul(tmp);
    tmp.setToTranslation(0,0,0);
    model.mul(tmp);
    transShader.setUniformMatrix("String_Node_Str",model);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().clearColor[0],Resources.getInstance().clearColor[1],Resources.getInstance().clearColor[2],Resources.getInstance().clearColor[3]);
    blockModel.render(transShader,GL20.GL_TRIANGLES);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().wireCubeEdgeColor[0],Resources.getInstance().wireCubeEdgeColor[1],Resources.getInstance().wireCubeEdgeColor[2],Resources.getInstance().wireCubeEdgeColor[3]);
    wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
  }
  if (mode == 0) {
    if (player != null) {
      pRay.set(player.position,player.direction);
      float oldDst=1111f;
      nextBlock=new Renderable();
      for (int i=0; i < renderObjects.size; i++) {
        if (!(renderObjects.get(i) instanceof Player) && !(renderObjects.get(i) instanceof Switch) && !((renderObjects.get(i) instanceof SwitchableBlock) && ((SwitchableBlock)renderObjects.get(i)).isSwitched)) {
          boolean intersect=Intersector.intersectRaySphere(pRay,renderObjects.get(i).position,1f,intersection);
          float dst=intersection.dst(player.position);
          if (dst < oldDst && intersect) {
            nextBlock=renderObjects.get(i);
            oldDst=dst;
          }
          renderObjects.get(i).isHighlightAnimation=false;
        }
      }
      if (oldDst > 1.0f && nextBlock != null) {
        nextBlock.isHighlightAnimation=true;
      }
    }
  }
  for (int i=0; i < renderObjects.size; ++i) {
    if (mode == 1 && renderObjects.get(i) instanceof EditorBlock) {
      model.set(renderObjects.get(i).model);
      transShader.setUniformMatrix("String_Node_Str",model);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().editorBlockColor[0],Resources.getInstance().editorBlockColor[1],Resources.getInstance().editorBlockColor[2],Resources.getInstance().editorBlockColor[3] + renderObjects.get(i).collideAnimation);
      blockModel.render(transShader,GL20.GL_TRIANGLES);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().editorBlockEdgeColor[0],Resources.getInstance().editorBlockEdgeColor[1],Resources.getInstance().editorBlockEdgeColor[2],Resources.getInstance().editorBlockEdgeColor[3] + renderObjects.get(i).collideAnimation);
      wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
    }
    if (renderObjects.get(i).isCollidedAnimation == true && renderObjects.get(i).collideAnimation == 0) {
      renderObjects.get(i).collideAnimation=1.0f;
    }
    if (renderObjects.get(i).collideAnimation > 0.0f) {
      renderObjects.get(i).collideAnimation-=delta * 1.f;
      renderObjects.get(i).collideAnimation=Math.max(0.0f,renderObjects.get(i).collideAnimation);
      if (renderObjects.get(i).collideAnimation == 0.0f)       renderObjects.get(i).isCollidedAnimation=false;
    }
    if (renderObjects.get(i).isHighlightAnimation == true && renderObjects.get(i).isHighlightAnimationFadeInOut) {
      renderObjects.get(i).highlightAnimation+=delta / 6.f;
      renderObjects.get(i).highlightAnimation=Math.min(0.5f,renderObjects.get(i).highlightAnimation);
      if (renderObjects.get(i).highlightAnimation >= 0.5) {
        renderObjects.get(i).isHighlightAnimationFadeInOut=!renderObjects.get(i).isHighlightAnimationFadeInOut;
      }
    }
    if (renderObjects.get(i).isHighlightAnimation == true && !renderObjects.get(i).isHighlightAnimationFadeInOut) {
      renderObjects.get(i).highlightAnimation-=delta / 6.f;
      renderObjects.get(i).highlightAnimation=Math.max(0.0f,renderObjects.get(i).highlightAnimation);
      if (renderObjects.get(i).highlightAnimation <= 0) {
        renderObjects.get(i).isHighlightAnimationFadeInOut=!renderObjects.get(i).isHighlightAnimationFadeInOut;
      }
    }
    if (renderObjects.get(i).isHighlightAnimation == false) {
      renderObjects.get(i).highlightAnimation-=delta / 1.f;
      renderObjects.get(i).highlightAnimation=Math.max(0.0f,renderObjects.get(i).highlightAnimation);
      if (renderObjects.get(i).highlightAnimation <= 0) {
        renderObjects.get(i).isHighlightAnimationFadeInOut=!renderObjects.get(i).isHighlightAnimationFadeInOut;
      }
    }
    if (renderObjects.get(i) instanceof SwitchableBlock) {
      if (((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true && ((SwitchableBlock)renderObjects.get(i)).isSwitched == true && ((SwitchableBlock)renderObjects.get(i)).switchAnimation == 0) {
        ((SwitchableBlock)renderObjects.get(i)).switchAnimation=0.0f;
      }
      if (((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true && ((SwitchableBlock)renderObjects.get(i)).isSwitched == false && ((SwitchableBlock)renderObjects.get(i)).switchAnimation == 1) {
        ((SwitchableBlock)renderObjects.get(i)).switchAnimation=1.0f;
      }
      if (((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true) {
        if (!((SwitchableBlock)renderObjects.get(i)).isSwitched) {
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation-=delta * 1.f;
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation=Math.max(0.0f,((SwitchableBlock)renderObjects.get(i)).switchAnimation);
          if (((SwitchableBlock)renderObjects.get(i)).switchAnimation == 0.0f)           ((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation=false;
        }
 else {
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation+=delta * 1.f;
          ((SwitchableBlock)renderObjects.get(i)).switchAnimation=Math.min(1.0f,((SwitchableBlock)renderObjects.get(i)).switchAnimation);
          if (((SwitchableBlock)renderObjects.get(i)).switchAnimation == 1.0f)           ((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation=false;
        }
      }
    }
    if (renderObjects.get(i) instanceof Block) {
      model.set(renderObjects.get(i).model);
      transShader.setUniformMatrix("String_Node_Str",model);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().blockColor[0],Resources.getInstance().blockColor[1],Resources.getInstance().blockColor[2],Resources.getInstance().blockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      blockModel.render(transShader,GL20.GL_TRIANGLES);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().blockEdgeColor[0],Resources.getInstance().blockEdgeColor[1],Resources.getInstance().blockEdgeColor[2],Resources.getInstance().blockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
    }
    if (renderObjects.get(i) instanceof MovableBlock) {
      model.set(renderObjects.get(i).model);
      transShader.setUniformMatrix("String_Node_Str",model);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().movableBlockColor[0],Resources.getInstance().movableBlockColor[1],Resources.getInstance().movableBlockColor[2],Resources.getInstance().movableBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
      transShader.setUniformf("String_Node_Str",Resources.getInstance().movableBlockEdgeColor[0],Resources.getInstance().movableBlockEdgeColor[1],Resources.getInstance().movableBlockEdgeColor[2],Resources.getInstance().movableBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
      blockModel.render(transShader,GL20.GL_TRIANGLES);
    }
    if (renderObjects.get(i) instanceof SwitchableBlock) {
      if (!((SwitchableBlock)renderObjects.get(i)).isSwitched || ((SwitchableBlock)renderObjects.get(i)).isSwitchAnimation == true) {
        model.set(renderObjects.get(i).model);
        SwitchableBlock tmpSwitchb=(SwitchableBlock)renderObjects.get(i);
switch (Math.abs(tmpSwitchb.id)) {
case 10:
          tmp.setToScaling(0.3f,0.3f,0.3f);
        model.mul(tmp);
      transShader.setUniformMatrix("String_Node_Str",model);
    transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
  playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 12:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 13:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
coneModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
default :
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(3f,3f,3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[1] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[2] * (Math.abs(((SwitchableBlock)renderObjects.get(i)).id)),Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation - ((SwitchableBlock)renderObjects.get(i)).switchAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
break;
}
}
}
if (renderObjects.get(i) instanceof Switch) {
model.set(renderObjects.get(i).model);
Switch tmpSwitch=(Switch)renderObjects.get(i);
switch (Math.abs(tmpSwitch.id)) {
case 10:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 12:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
blockModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
case 13:
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
coneModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
default :
tmp.setToScaling(0.3f,0.3f,0.3f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockColor[0],Resources.getInstance().switchBlockColor[1],Resources.getInstance().switchBlockColor[2],Resources.getInstance().switchBlockColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f,2.0f,2.0f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().switchBlockEdgeColor[0],Resources.getInstance().switchBlockEdgeColor[1],Resources.getInstance().switchBlockEdgeColor[2],Resources.getInstance().switchBlockEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
break;
}
}
if (renderObjects.get(i) instanceof Player) {
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXBack);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYBack);
model.mul(tmp);
tmp.setToScaling(0.5f,0.5f,0.5f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().playerColor[0],Resources.getInstance().playerColor[1],Resources.getInstance().playerColor[2],Resources.getInstance().playerColor[3] + renderObjects.get(i).collideAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
tmp.setToScaling(2.0f - (renderObjects.get(i).collideAnimation),2.0f - (renderObjects.get(i).collideAnimation),2.0f - (renderObjects.get(i).collideAnimation));
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().playerEdgeColor[0],Resources.getInstance().playerEdgeColor[1],Resources.getInstance().playerEdgeColor[2],Resources.getInstance().playerEdgeColor[3] + renderObjects.get(i).collideAnimation);
playerModel.render(transShader,GL20.GL_LINE_STRIP);
playerModel.render(transShader,GL20.GL_LINE_STRIP,0,(int)(playerModel.getNumVertices() - (renderObjects.get(i).collideAnimation * playerModel.getNumVertices())));
}
if (renderObjects.get(i) instanceof Portal) {
if (renderObjects.get(i).position.x != -11) {
Portal tmpPortal=(Portal)renderObjects.get(i);
switch (Math.abs(tmpPortal.id)) {
case 4:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 5:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor2[0],Resources.getInstance().portalColor2[1],Resources.getInstance().portalColor2[2],Resources.getInstance().portalColor2[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor2[0],Resources.getInstance().portalColor2[1],Resources.getInstance().portalColor2[2],Resources.getInstance().portalColor2[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 6:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor3[0],Resources.getInstance().portalColor3[1],Resources.getInstance().portalColor3[2],Resources.getInstance().portalColor3[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor3[0],Resources.getInstance().portalColor3[1],Resources.getInstance().portalColor3[2],Resources.getInstance().portalColor3[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 7:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor4[0],Resources.getInstance().portalColor4[1],Resources.getInstance().portalColor4[2],Resources.getInstance().portalColor4[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor4[0],Resources.getInstance().portalColor4[1],Resources.getInstance().portalColor4[2],Resources.getInstance().portalColor4[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
case 8:
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor5[0],Resources.getInstance().portalColor5[1],Resources.getInstance().portalColor5[2],Resources.getInstance().portalColor5[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor5[0],Resources.getInstance().portalColor5[1],Resources.getInstance().portalColor5[2],Resources.getInstance().portalColor5[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
default :
model.set(renderObjects.get(i).model);
tmp.setToScaling(0.4f,0.4f,0.4f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
playerModel.render(transShader,GL20.GL_TRIANGLES);
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.X,angleXFront);
model.mul(tmp);
tmp.setToRotation(Vector3.Y,angleYFront);
model.mul(tmp);
tmp.setToScaling(0.8f,0.8f,0.8f);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().portalColor[0],Resources.getInstance().portalColor[1],Resources.getInstance().portalColor[2],Resources.getInstance().portalColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
wireCubeModel.render(transShader,GL20.GL_LINE_STRIP);
break;
}
}
}
if (renderObjects.get(i) instanceof Target) {
model.set(renderObjects.get(i).model);
tmp.setToRotation(Vector3.Y,angleY + angleYBack);
model.mul(tmp);
transShader.setUniformMatrix("String_Node_Str",model);
transShader.setUniformf("String_Node_Str",Resources.getInstance().targetColor[0],Resources.getInstance().targetColor[1],Resources.getInstance().targetColor[2],Resources.getInstance().targetColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
targetModel.render(transShader,GL20.GL_TRIANGLES);
transShader.setUniformf("String_Node_Str",Resources.getInstance().targetEdgeColor[0],Resources.getInstance().targetEdgeColor[1],Resources.getInstance().targetEdgeColor[2],Resources.getInstance().targetEdgeColor[3] + renderObjects.get(i).collideAnimation + renderObjects.get(i).highlightAnimation);
targetModel.render(transShader,GL20.GL_LINE_STRIP);
}
}
transShader.end();
}