Okay, everything is working now. Thanks!
However, I do have one remaining question. Basically, when I begin drawing to a texture, the starting point for the draw commands is offset in the Y direction, always, and by a predictable amount.
This is my code to start rendering to a texture:
public static boolean beginDrawingTo(Texture texture)
IntBuffer buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
EXTFramebufferObject.GL_COLOR_ATTACHMENT0_EXT, GL11.GL_TEXTURE_2D, texture.getTextureID(), 0);
GL11.glOrtho(0, texture.getImageWidth(), 0,-texture.getImageHeight(), -1, 1);
GL11.glTranslated(texture.getImageWidth() / 2, texture.getImageHeight() / 2, 0);
GL11.glScalef(1f, -1f, 1f);
If I place
GL11.glTranslated(0, WindowManager.getScreenHeight() - texture.getImageHeight(), 0);right after glLoadIdentity(), everything works.
Why is this the case? I'm happy it's working, but a little confused.