Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <Windows.h>
  3. #include <gl\GL.h>
  4. #include <gl\GLU.h>
  5. #include "glut.h"
  6.  
  7. void display();
  8. float angle = 0.0;
  9. void idle();
  10.  
  11. int main(int argc, char* argv[])
  12. {
  13. glutInit(&argc, argv);
  14. glutInitWindowPosition(10, 10);
  15. glutInitWindowSize(640, 480);
  16. glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
  17. glutCreateWindow("Glut Window: Hello World");
  18.  
  19. glPushMatrix();
  20. glRotatef(angle, 0.0, 1.0, 0.0);
  21. glutWireTeapot(0.5);
  22. glPopMatrix();
  23.  
  24. glutDisplayFunc(display);
  25. glutIdleFunc(idle);
  26.  
  27. glutMainLoop();
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement