Hey everyone.
So, i've run into a problem.
Well, its not a problem, because i know how to fix it, but, i want to know why it is happening.
I was playing with OpenGL, making squares, and this happened:
Keep in mind, im using gluOrtho2D(-1, 1, -1, 1) , and this shape is drawn on the 3rd quadrant of a 2D plane.
(Interestingly, if i change GL_QUADS to GL_POLYGON, the shape gets turned 180º)
I tried to figure out what was happening, and changed GL_QUADS to GL_LINE_LOOP
So far so good, i understand that i have to change the order of the vertexes, and doing that, makes the square perfect.
Now, my questions are:
In the first image, instead of a weird 5 sided shape, shouldnt it be something like an hourglass, like the second image?
Assuming that GL_QUADS work something like GL_TRIANGLE_FAN that paints the first triangle (first three coordinates) and then paints a second triangle, using the the first coordinate, the last one, and the "new" one, shouldnt be the shape in the 1st picture be rotated 180º ?
How does GL_QUADS really work?
Thank you.