but I can't figure out how to draw only a specific section of the image that I've loaded.
There is a way. Each point in space (glVertex2f, glVertex3f...) has texture coordinate connected with it (glTexCoord2f...). Texture coordinates are :
0,1 1,1
0,0 1,0
imagine them on top of your image. So if you want to map only bottom half of your texture onto quad, for example, you will have 4 points in space (glVertex) and 4 texture coordinates attached to them, but in range:
0,0.5 1,0.5
0,0 1,0
example of full image maped on quad (done by triangle_strip):
GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
{
GL11.glTexCoord2f(1.0f, 1.0f);
GL11.glVertex3f(x + quadSize, y + quadSize, z);
GL11.glTexCoord2f(0.0f, 1.0f);
GL11.glVertex3f(x - quadSize, y + quadSize, z);
GL11.glTexCoord2f(1.0f, 0.0f);
GL11.glVertex3f(x + quadSize, y - quadSize, z);
GL11.glTexCoord2f(0.0f, 0.0f);
GL11.glVertex3f(x - quadSize, y - quadSize, z);
}
GL11.glEnd();