public void drawEmbedded ( float x , float y , float width , float height ) { init ( ) ; if ( corners == null ) { GL . glTexCoord2f ( textureOffsetX , textureOffsetY ) ; GL . glVertex3f ( x , y , 0 ) ; GL . glTexCoord2f ( textureOffsetX , textureOffsetY + textureHeight ) ; GL . glVertex3f ( x , y + height , 0 ) ; GL . glTexCoord2f ( textureOffsetX + textureWidth , textureOffsetY + textureHeight ) ; GL . glVertex3f ( x + width , y + height , 0 ) ; GL . glTexCoord2f ( textureOffsetX + textureWidth , textureOffsetY ) ; GL . glVertex3f ( x + width , y , 0 ) ; } else { corners [ TOP_LEFT ] . bind ( ) ; GL . glTexCoord2f ( textureOffsetX , textureOffsetY ) ; GL . glVertex3f ( x , y , 0 ) ; corners [ BOTTOM_LEFT ] . bind ( ) ; GL . glTexCoord2f ( textureOffsetX , textureOffsetY + textureHeight ) ; GL . glVertex3f ( x , y + height , 0 ) ; corners [ BOTTOM_RIGHT ] . bind ( ) ; GL . glTexCoord2f ( textureOffsetX + textureWidth , textureOffsetY + textureHeight ) ; GL . glVertex3f ( x + width , y + height , 0 ) ; corners [ TOP_RIGHT ] . bind ( ) ; GL . glTexCoord2f ( textureOffsetX + textureWidth , textureOffsetY ) ; GL . glVertex3f ( x + width , y , 0 ) ; } }
Draw this image as part of a collection of images