Advertisement
Guest User

igore

a guest
Oct 13th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. int DrawGLScene() // Here's Where We Do All The Drawing
  2. {
  3. glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
  4. glLoadIdentity(); // Reset The Current Modelview Matrix
  5.  
  6. // Finished Drawing The Triangle
  7. glTranslatef(-2.0f,0.0f,-25.0f);
  8. // Move Right 3 Units
  9. glBegin(GL_QUADS); // Draw A Quad
  10. glVertex3f(0.5f, 1.5f, 0.0f); // Top Left
  11. glVertex3f( 1.0f, 1.5f, 0.0f); // Top Right
  12. glVertex3f( 1.0f,-3.0f, 0.0f); // Bottom Right
  13. glVertex3f(0.5f,-3.0f, 0.0f); // Bottom Left
  14. glEnd();
  15. glTranslatef(3.0f,0.0f,-25.0f);
  16. glBegin(GL_QUADS); // Draw A Quad
  17. glVertex3f(0.0f, 2.0f, 0.0f); // Top Left
  18. glVertex3f( 1.0f, 3.0f, 0.0f); // Top Right
  19. glVertex3f( 1.0f,-2.0f, 0.0f); // Bottom Right
  20. glVertex3f(0.0f,-1.0f, 0.0f); // Bottom Left
  21. glEnd();
  22.  
  23. glTranslatef(3.0f,3.0f,0.0f); // Move Right 3 Units
  24. glBegin(GL_QUADS); // Draw A Quad
  25. glVertex3f(-2.0f, 0.0f, 0.0f); // Top Left
  26. glVertex3f( 1.0f, 0.0f, 0.0f); // Top Right
  27. glVertex3f( 2.0f,-1.0f, 0.0f); // Bottom Right
  28. glVertex3f(-2.0f,-1.0f, 0.0f); // Bottom Left
  29. glEnd();
  30.  
  31. glTranslatef(0.0f,-4.0f,0.0f); // Move Right 3 Units
  32. glBegin(GL_QUADS); // Draw A Quad
  33. glVertex3f(-2.0f, 0.0f, 0.0f); // Top Left
  34. glVertex3f( 1.0f, 0.0f, 0.0f); // Top Right
  35. glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
  36. glVertex3f(-2.0f,-1.0f, 0.0f); // Bottom Left
  37. glEnd();
  38. glTranslatef(0.0f,-4.0f,0.0f); // Move Right 3 Units
  39. glBegin(GL_QUADS); // Draw A Quad
  40. glVertex3f(-3.0f, 0.0f, 0.0f); // Top Left
  41. glVertex3f( 1.0f, 0.0f, 0.0f); // Top Right
  42. glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
  43. glVertex3f(-2.0f,-1.0f, 0.0f); // Bottom Left
  44. glEnd();
  45. glTranslatef(1.0f,1.0f,0.0f);
  46. glBegin(GL_QUADS); // Draw A Quad
  47. glVertex3f(0.0f, 3.0f, 0.0f); // Top Left
  48. glVertex3f( 1.0f, 2.0f, 0.0f); // Top Right
  49. glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
  50. glVertex3f(0.0f,-2.0f, 0.0f); // Bottom Left
  51. glEnd();
  52. // Done Drawing The Quad
  53. return TRUE; // Keep Going
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement