Hello,
I am starting OpenGL and I was looking a the Golden Triangle example on Apple's developer website. In the example the triangle is drawn like this:
The triangle appears in the center of the window. I can't figure out why it appears in the center. If the OpenGL coordinates begin in the lower left corner and they are using measurements less than a pixel, then how does it get to the center. What am I missing??
In other words what unit of measurement is being used in "x" and "y"?
Thanks!
I am starting OpenGL and I was looking a the Golden Triangle example on Apple's developer website. In the example the triangle is drawn like this:
Code:
glBegin(GL_TRIANGLES);{
glVertex2f(0.0, 0.6);
glVertex2f(-0.2, -0.3);
glVertex2f(0.2, -0.3);
}
The triangle appears in the center of the window. I can't figure out why it appears in the center. If the OpenGL coordinates begin in the lower left corner and they are using measurements less than a pixel, then how does it get to the center. What am I missing??
In other words what unit of measurement is being used in "x" and "y"?
Thanks!
Last edited: