Program: 163708
Project: 163708
Buggy source:
protected void setMultitextureBlend(PTexture[] textures,int num){
  if (2 < num) {
    PGraphics.showWarning("String_Node_Str");
    return;
  }
  gl.glDisable(GL10.GL_BLEND);
  if (!texenvCrossbarSupported) {
    PGraphics.showWarning("String_Node_Str");
    if (blendMode == REPLACE) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
    }
 else     if (blendMode == BLEND) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_RGB,GL11.GL_ONE_MINUS_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
    }
 else     if (blendMode == MULTIPLY) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else     if (blendMode == ADD) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else     if (blendMode == SUBTRACT) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_SUBTRACT);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else {
      PGraphics.showWarning("String_Node_Str");
    }
  }
 else {
    if (blendMode == REPLACE) {
    }
 else     if (blendMode == BLEND) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_RGB,GL11.GL_ONE_MINUS_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_PRIMARY_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_REPLACE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else     if (blendMode == MULTIPLY) {
    }
 else     if (blendMode == ADD) {
    }
 else     if (blendMode == SUBTRACT) {
    }
 else {
      PGraphics.showWarning("String_Node_Str");
    }
  }
  gl.glEnable(GL10.GL_BLEND);
  gl.glBlendFunc(GL10.GL_SRC_ALPHA,GL10.GL_ONE_MINUS_SRC_ALPHA);
}

Fixed version (ground truth):
protected void setMultitextureBlend(PTexture[] textures,int num){
  if (2 < num) {
    PGraphics.showWarning("String_Node_Str");
    return;
  }
  gl.glDisable(GL10.GL_BLEND);
  if (!texenvCrossbarSupported) {
    PGraphics.showWarning("String_Node_Str");
    if (blendMode == REPLACE) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
    }
 else     if (blendMode == BLEND) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_RGB,GL11.GL_ONE_MINUS_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
    }
 else     if (blendMode == MULTIPLY) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else     if (blendMode == ADD) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else     if (blendMode == SUBTRACT) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
      gl11.glActiveTexture(GL11.GL_TEXTURE1);
      gl11.glBindTexture(textures[1].getGLTarget(),textures[1].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_SUBTRACT);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_PREVIOUS);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
    }
 else {
      PGraphics.showWarning("String_Node_Str");
    }
  }
 else {
    if (blendMode == REPLACE) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_REPLACE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_REPLACE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      modulateWithPrimaryColor(1,textures[1]);
    }
 else     if (blendMode == BLEND) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_RGB,GL11.GL_ONE_MINUS_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_INTERPOLATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC2_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND2_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
      modulateWithPrimaryColor(1,textures[1]);
    }
 else     if (blendMode == MULTIPLY) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_MODULATE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      modulateWithPrimaryColor(1,textures[1]);
    }
 else     if (blendMode == ADD) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_ADD);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      modulateWithPrimaryColor(1,textures[1]);
    }
 else     if (blendMode == SUBTRACT) {
      gl11.glActiveTexture(GL11.GL_TEXTURE0);
      gl11.glBindTexture(textures[0].getGLTarget(),textures[0].getGLID());
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_TEXTURE_ENV_MODE,GL11.GL_COMBINE);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_RGB,GL11.GL_SUBTRACT);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_RGB,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_RGB,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_RGB,GL11.GL_SRC_COLOR);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_COMBINE_ALPHA,GL11.GL_SUBTRACT);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC0_ALPHA,GL11.GL_TEXTURE0);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_SRC1_ALPHA,GL11.GL_TEXTURE1);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND0_ALPHA,GL11.GL_SRC_ALPHA);
      gl11.glTexEnvi(GL11.GL_TEXTURE_ENV,GL11.GL_OPERAND1_ALPHA,GL11.GL_SRC_ALPHA);
      modulateWithPrimaryColor(1,textures[1]);
    }
 else {
      PGraphics.showWarning("String_Node_Str");
    }
  }
  gl.glEnable(GL10.GL_BLEND);
  gl.glBlendFunc(GL10.GL_SRC_ALPHA,GL10.GL_ONE_MINUS_SRC_ALPHA);
}