Program: 109214
Project: 109214
Buggy source:
protected void setMultitextureBlend(PTexture[] textures,int num){
  if (2 < num) {
    PGraphics.showWarning("String_Node_Str");
    return;
  }
  if (!texenvCrossbarSupported) {
    PGraphics.showWarning("String_Node_Str");
    if (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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");
    }
  }
}

Fixed version (ground truth):
protected void setMultitextureBlend(PTexture[] textures,int num){
  if (2 < num) {
    PGraphics.showWarning("String_Node_Str");
    return;
  }
  if (!texenvCrossbarSupported) {
    PGraphics.showWarning("String_Node_Str");
    if (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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 (multitexureBlendMode == 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.glDisable(GL10.GL_BLEND);
}