Before I begin I apologize if I put this in the wrong place. But I'm pretty sure that this is the right place.
Anyways I'm just starting to learn OpenGl and I was wondering about this code.
Anyways if I understand glTranslate correctly then thats basically the starting point for any drawing you decide to do? So the second part of the code should just cover up the first?Code:glTranslatef(0.0f,0.0f,-6.0f); // Move Left 1.5 Units And Into The Screen 6.0 glBegin(GL_TRIANGLES); // Drawing Using Triangles glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red glVertex3f( 0.0f, 1.0f, -10.0f); // Top glVertex3f(-1.0f,-1.0f, -10.0f); // Bottom Left glVertex3f( 1.0f,-1.0f, -10.0f); // Bottom Right glColor3f(0.0f,1.0f,0.0f); // Set The Color To green glVertex3f( 0.0f, 1.0f, -10.0f); // Top glVertex3f(-1.0f,-1.0f, -10.0f); // Bottom Left glVertex3f( 1.0f,-1.0f, -10.0f); // Bottom Right glEnd(); // Finished Drawing The Triangle
Thanks for reading this



LinkBack URL
About LinkBacks



