private void renderTexture(Texture texture,double centerX,double centerY){
  TextureCoords tc=texture.getImageTexCoords();
  float tx1=tc.left();
  float ty1=tc.top();
  float tx2=tc.right();
  float ty2=tc.bottom();
  float halfWidth=quarterValue(texture.getWidth());
  float halfHeight=quarterValue(texture.getHeight());
  GL2 gl=scene.gl;
  texture.bind(gl);
  texture.enable(gl);
  Color foreground=scene.getForegroundColor();
  gl.glColor4f(foreground.getRed() / 255f,foreground.getGreen() / 255f,foreground.getBlue() / 255f,foreground.getAlpha() / 255f);
  gl.glPushMatrix();
  float[] translate=GLScene.P((float)centerX,(float)centerY);
  gl.glTranslatef(translate[0],translate[1],translate[2]);
  gl.glBegin(GL2.GL_QUADS);
  gl.glTexCoord2f(tx1,ty1);
  GLScene.V(gl,-halfWidth,halfHeight);
  gl.glTexCoord2f(tx2,ty1);
  GLScene.V(gl,halfWidth,halfHeight);
  gl.glTexCoord2f(tx2,ty2);
  GLScene.V(gl,halfWidth,-halfHeight);
  gl.glTexCoord2f(tx1,ty2);
  GLScene.V(gl,-halfWidth,-halfHeight);
  gl.glEnd();
  gl.glPopMatrix();
  texture.disable(gl);
}

private void renderTexture ( Texture texture , double centerX , double centerY ) { TextureCoords tc = texture . getImageTexCoords ( ) ; float tx1 = tc . left ( ) ; float ty1 = tc . top ( ) ; float tx2 = tc . right ( ) ; float ty2 = tc . bottom ( ) ; float halfWidth = quarterValue ( texture . getWidth ( ) ) ; float halfHeight = quarterValue ( texture . getHeight ( ) ) ; GL2 gl = scene . gl ; texture . bind ( gl ) ; texture . enable ( gl ) ; Color foreground = scene . getForegroundColor ( ) ; gl . glColor4f ( foreground . getRed ( ) / 255f , foreground . getGreen ( ) / 255f , foreground . getBlue ( ) / 255f , foreground . getAlpha ( ) / 255f ) ; gl . glPushMatrix ( ) ; float [ ] translate = GLScene . P ( ( float ) centerX , ( float ) centerY ) ; gl . glTranslatef ( translate [ 0 ] , translate [ 1 ] , translate [ 2 ] ) ; gl . glBegin ( GL2 . GL_QUADS ) ; gl . glTexCoord2f ( tx1 , ty1 ) ; GLScene . V ( gl , - halfWidth , halfHeight ) ; gl . glTexCoord2f ( tx2 , ty1 ) ; GLScene . V ( gl , halfWidth , halfHeight ) ; gl . glTexCoord2f ( tx2 , ty2 ) ; GLScene . V ( gl , halfWidth , - halfHeight ) ; gl . glTexCoord2f ( tx1 , ty2 ) ; GLScene . V ( gl , - halfWidth , - halfHeight ) ; gl . glEnd ( ) ; gl . glPopMatrix ( ) ; texture . disable ( gl ) ; }
render a texture to the given position .
