title: BufferedImage texture doesnt appear in java3D
body: <p>I'm quite new in java3D and on stackoverflow. My problem is I try to add a BufferedImage texture to a rectangle, and it doesnt appear. I saved the BufferedImage to a file so I'm sure it's not empty. "bi" is the BufferedImage. It seems anything I can find about java3D is quite outdated. Comments are about the commands above it, not below.</p>
  
  <pre><code>    QuadArray alap = new QuadArray(4, QuadArray.COORDINATES | GeometryArray.TEXTURE_COORDINATE_2);
  
      // [...] setting coordinates for the polygon (rectangle)
  
      Appearance alapAppearance = new Appearance();
      PolygonAttributes alapPa = new PolygonAttributes();
  
      alapAppearance.setPolygonAttributes(alapPa);
  
      alap.setTextureCoordinate (0, 0, new TexCoord2f(0.0f,0.0f));
      alap.setTextureCoordinate (0, 1, new TexCoord2f(1.0f,0.0f));
      alap.setTextureCoordinate (0, 2, new TexCoord2f(1.0f,1.0f));
      alap.setTextureCoordinate (0, 3, new TexCoord2f(0.0f,1.0f));
      //tryed in different order
  
      TextureAttributes texAttr = new TextureAttributes();
      texAttr.setTextureMode(TextureAttributes.REPLACE);
      TextureLoader loader = new TextureLoader(bi, TextureLoader.ALLOW_NON_POWER_OF_TWO);
      //Tryed with "RGB" flag too (as second parameter).
      Texture t1 = loader.getTexture();
  
  t1.setBoundaryModeS(Texture.CLAMP_TO_EDGE);
  t1.setBoundaryModeT(Texture.CLAMP_TO_EDGE);
  
      alapAppearance.setCapability(Appearance.ALLOW_TEXTURE_WRITE);
      alapAppearance.setCapability(Appearance.ALLOW_TEXTURE_ATTRIBUTES_WRITE);
      //I don't think it's really needed, but can't hurt I quess.
      alapAppearance.setTextureAttributes(texAttr);
      alapAppearance.setTexture(t1);
  
      tfg.addChild(new Shape3D(alap, alapAppearance));
      //tfg = transformGroup
  </code></pre>