After a good deal of internet sleuthing, I believe I've got the answer to petersielje's problem. I think kostbot did not understand the question. You have a slick2d Transform object, and want to apply it to an image, not just apply a series of known rotations translations and scales.
Code:
public void render(Image image,Transform transform, Graphics g){
float[] tm=transform.getMatrixPosition(); //get the transform matrix
//pad the transform to get a 4x4 3d affine transform
float[] toBuffer={
tm[0],tm[3],0,tm[6],
tm[1],tm[4],0,tm[7],
0 ,0 ,1 ,0,
tm[2],tm[5],0 ,1 //<-note that I have not used tm[8] here as one might expect
};
//GL11 wants a "direct" FloatBuffer, but you can only get that by creating a direct ByteBuffer
//and then creating a FloatBuffer as a view of that ByteBuffer.
//the ByteBuffer is allocated 16*4 bytes, because there are 16 floats and each float needs 4 bytes
ByteBuffer bb=ByteBuffer.allocateDirect(16*4);
//this has something to do with the default byte order setting in Java being inappropriate
bb.order(ByteOrder.nativeOrder());
for(float f:toBuffer){
bb.putFloat(f);
}
bb.rewind();
FloatBuffer transformBuffer=bb.asFloatBuffer();
GL11.glPushMatrix();
GL11.glLoadMatrix(transformBuffer);
image.draw();
GL11.glPopMatrix();
}
This seems to be working for me for a combination of translations, scales, and rotations.