Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int DrawGLScene() // Here's Where We Do All The Drawing
- {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
- glLoadIdentity(); // Reset The Current Modelview Matrix
- // Finished Drawing The Triangle
- glTranslatef(-2.0f,0.0f,-25.0f);
- // Move Right 3 Units
- glBegin(GL_QUADS); // Draw A Quad
- glVertex3f(0.5f, 1.5f, 0.0f); // Top Left
- glVertex3f( 1.0f, 1.5f, 0.0f); // Top Right
- glVertex3f( 1.0f,-3.0f, 0.0f); // Bottom Right
- glVertex3f(0.5f,-3.0f, 0.0f); // Bottom Left
- glEnd();
- glTranslatef(3.0f,0.0f,-25.0f);
- glBegin(GL_QUADS); // Draw A Quad
- glVertex3f(0.0f, 2.0f, 0.0f); // Top Left
- glVertex3f( 1.0f, 3.0f, 0.0f); // Top Right
- glVertex3f( 1.0f,-2.0f, 0.0f); // Bottom Right
- glVertex3f(0.0f,-1.0f, 0.0f); // Bottom Left
- glEnd();
- glTranslatef(3.0f,3.0f,0.0f); // Move Right 3 Units
- glBegin(GL_QUADS); // Draw A Quad
- glVertex3f(-2.0f, 0.0f, 0.0f); // Top Left
- glVertex3f( 1.0f, 0.0f, 0.0f); // Top Right
- glVertex3f( 2.0f,-1.0f, 0.0f); // Bottom Right
- glVertex3f(-2.0f,-1.0f, 0.0f); // Bottom Left
- glEnd();
- glTranslatef(0.0f,-4.0f,0.0f); // Move Right 3 Units
- glBegin(GL_QUADS); // Draw A Quad
- glVertex3f(-2.0f, 0.0f, 0.0f); // Top Left
- glVertex3f( 1.0f, 0.0f, 0.0f); // Top Right
- glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
- glVertex3f(-2.0f,-1.0f, 0.0f); // Bottom Left
- glEnd();
- glTranslatef(0.0f,-4.0f,0.0f); // Move Right 3 Units
- glBegin(GL_QUADS); // Draw A Quad
- glVertex3f(-3.0f, 0.0f, 0.0f); // Top Left
- glVertex3f( 1.0f, 0.0f, 0.0f); // Top Right
- glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
- glVertex3f(-2.0f,-1.0f, 0.0f); // Bottom Left
- glEnd();
- glTranslatef(1.0f,1.0f,0.0f);
- glBegin(GL_QUADS); // Draw A Quad
- glVertex3f(0.0f, 3.0f, 0.0f); // Top Left
- glVertex3f( 1.0f, 2.0f, 0.0f); // Top Right
- glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
- glVertex3f(0.0f,-2.0f, 0.0f); // Bottom Left
- glEnd();
- // Done Drawing The Quad
- return TRUE; // Keep Going
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement