Order of operations does matter in OpenGL. This code goes as follows:
Put down a "pencil" (I suggest you do this with a real pencil on an actual piece of paper, while reading this, i.e. following the instructions, put down the pencil and do the following movements without lifting it) – Draw a quad
GL11.glBegin(GL11.GL_QUADS);
First corner bottom left
GL11.glVertex2i(0, 0);
Second corner bottom right
GL11.glVertex2i(800, 0);
Thid corner top left
GL11.glVertex2i(0, 600);
Fourth corner top right
GL11.glVertex2i(800, 600);
Finish quad by returning with the pencil to the first point.
GL11.glEnd();
OpenGL expects you to deliver it convex geometry with a consistent winding, i.e. the vertices are drawn in clockwise or counterclockwise direction. You're switching directions inbetween, which makes the shape you define nonconvex.
I strongly suggest you keep to a counter clockwise winding:
- Bottom Left
- Bottom Right
- Top Right
- Top Left
That's also how you'd draw a quad with a pencil.