Guest User

Untitled

a guest
Aug 8th, 2012
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. void Displaya()
  2. {
  3. glViewport(0,0,800,600);
  4. glMatrixMode(GL_PROJECTION);
  5. glPushMatrix();
  6. glLoadIdentity();
  7. gluPerspective(45.0f,800.0f/600.0f,1.0f,500.0f);
  8. glMatrixMode(GL_MODELVIEW);
  9. glEnable(GL_CULL_FACE);
  10. //glEnable(GL_DEPTH_TEST);
  11. //glDepthMask(GL_TRUE);
  12. Camera.Render();
  13.  
  14.  
  15.  
  16. glTranslatef(0.0f,0.0f,-5.0f);
  17. //glRotatef(Rot,0.0f,0.0f,1.0f);
  18. //glRotatef(Rot,1.0f,0.6f,0.0f);
  19. glBegin(GL_QUADS);
  20. glColor3f(1.0f,0.0f,0.0f); // Red
  21. glVertex3f(-1.0f, 1.0f, 1.0f);
  22. glVertex3f( 1.0f, 1.0f, 1.0f);
  23. glVertex3f( 1.0f, 1.0f,-1.0f);
  24. glVertex3f(-1.0f, 1.0f,-1.0f);
  25.  
  26. glColor3f(0.0f,0.0f,1.0f); // Blue
  27. glVertex3f(-1.0f,-1.0f, 1.0f);
  28. glVertex3f(-1.0f,-1.0f,-1.0f);
  29. glVertex3f( 1.0f,-1.0f,-1.0f);
  30. glVertex3f( 1.0f,-1.0f, 1.0f);
  31.  
  32. glColor3f(0.0f,1.0f,0.0f);
  33. glVertex3f(-1.0f,1.0f,-1.0f);
  34. glVertex3f(-1.0f,-1.0f,-1.0f);
  35. glVertex3f(-1.0f,-1.0f,1.0f);
  36. glVertex3f(-1.0f,1.0f,1.0f);
  37.  
  38. glColor3f(0.0f,1.0f,1.0f);
  39. glVertex3f(1.0f,1.0f,1.0f);
  40. glVertex3f(1.0f,1.0f,-1.0f);
  41. glVertex3f(1.0f,-1.0f,-1.0f);
  42. glVertex3f(1.0f,-1.0f,1.0f);
  43.  
  44. glColor3f(1.0f,1.0f,0.0f);
  45. glVertex3f(1.0f,1.0f,1.0f);
  46. glVertex3f(1.0f,-1.0f,1.0f);
  47. glVertex3f(-1.0f,-1.0f,1.0f);
  48. glVertex3f(-1.0f,1.0f,1.0f);
  49.  
  50. glColor3f(1.0f,0.0f,1.0f);
  51. glVertex3f(1.0f,1.0f,-1.0f);
  52. glVertex3f(1.0f,-1.0f,-1.0f);
  53. glVertex3f(-1.0f,-1.0f,-1.0f);
  54. glVertex3f(-1.0f,1.0f,-1.0f);
  55. glEnd();
  56.  
  57. //FlipBuffers();
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment