Hello, thank you for replying.
Try inserting a call to bind() after glGenTextures().
I don't believe that will do anything because bind() is being called in the draw() method which is called in the driver (not shown).
One obvious bug is that you are lacking glTexCoord*() calls inside of glBegin/glEnd. So your vertices currently don't have any texture coordinates and OpenGL does not automagically perform UV unwrapping.
Okay, yes I do that, so now the method looks like this:
public void draw() {
bind();
glBegin(GL_QUADS);
glTexCoord2d(0, 0);
glVertex2d(c1.x, c1.y);
glTexCoord2d(1, 0);
glVertex2d(c2.x, c2.y);
glTexCoord2d(1, 1);
glVertex2d(c3.x, c3.y);
glTexCoord2d(0, 1);
glVertex2d(c4.x, c4.y);
glEnd();
}
It still did not work (unless I did something wrong.. I'm better at drawing shapes than pictures), so I don't know what to do now.