Display.destroy();
}
public void drawSprite(int id)
{
Sprite s = unitManager.getSprite(id);
Texture tex = s.getTexture();
Vector2f wc_position = s.getPosition();
float rotation = s.getRotation();
if(map.isInMap(Math.worldToMap(wc_position, map.getTilesize())) && viewport.scale_cpy(1.1f).isInside(wc_position))
{
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnable(GL_TEXTURE_2D);
glPushMatrix();
tex.bind();
glTranslatef(Math.worldToScreen(wc_position.x(),viewport.getLeft()), Math.worldToScreen(wc_position.y(),viewport.getTop()), 0f);
glRotatef(rotation, 0, 0, 1.0f);
//glTranslatef(-texture.getImageWidth()/2, -texture.getImageHeight()/2, 0);
glVertexPointer(2, 0, s.getVertexBuffer());
glTexCoordPointer(2, 0, s.getTextureBuffer());
glDrawArrays(GL_QUADS, 0, 4);
glPopMatrix();