Hello,
I am learning Opengl.I am confused with the view transformation and model transformation.
I understood the above code as view transformation,setting the camera position at (0,0,-Code :glLoadIdentity(); glTranslatef(0.0f,0.0f,-8.0f); glBegin(GL_POLYGON); glVertex3f(1.0f,0.0f,-8.0f); glVertex3f(3.0f,0.0f,-8.0f); glVertex3f(2.0f,2.0f,-8.0f); glEnd();and viewing the triangle.
Code :glBegin(GL_POLYGON); glVertex3f(1.0f,0.0f,-8.0f); glVertex3f(3.0f,0.0f,-8.0f); glVertex3f(2.0f,2.0f,-8.0f); glEnd(); glLoadIdentity(); glTranslatef(0.0f,0.0f,-8.0f);
I understand this as Model transformation,translating the object by (0,0,-.
Both gives the same output. Have i understood correctly?
-swetha