naeem043

Star

Jan 2nd, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.51 KB | None | 0 0
  1. //#include <GL/glut.h>
  2. //
  3. //void star() {
  4. //
  5. //  glColor3f(1, 1, 1);
  6. //  glBegin(GL_LINE_LOOP);
  7. //    glVertex3f(-0.8, 0, 0);
  8. //  glColor3f(1, 0, 0);
  9. //  glVertex3f(0.8, 0, 0);
  10. //  glColor3f(0, 1, 0);
  11. //  glVertex3f(-.6, -0.8, 0);      
  12. //  glColor3f(0, 1, 0);
  13. //  glVertex3f(0.0,.5, 0);
  14. //  glColor3f(0, 0, 1);
  15. //    glVertex3f(.6, -0.8, 0);
  16. //  glEnd();
  17. //
  18. //}
  19. //
  20. //void display() {
  21. //
  22. //  glClearColor (0,0,0,1);
  23. //    glClear (GL_COLOR_BUFFER_BIT);
  24. //    glLoadIdentity();  
  25. //    gluLookAt (0, 0, 5, 0, 0, 0, 0, 1, 0);
  26. //  star();
  27. //  glFlush();
  28. //}
  29. //
  30. //void reshape (int w, int h) {
  31. //
  32. ////Set the viewport to be the entire window
  33. //  glViewport (0, 0, (GLsizei)w, (GLsizei)h);
  34. //
  35. //  // setting the camera
  36. //  glMatrixMode (GL_PROJECTION);
  37. //  glLoadIdentity ();  
  38. //
  39. //  //perspective transform
  40. //  //gluPerspective (30, (GLfloat)w / (GLfloat)h, 1.0, 100.0);
  41. //  gluPerspective (30, 1, 1.0, 100.0);
  42. //  glMatrixMode (GL_MODELVIEW); //switch back the the model editing mode.
  43. //
  44. //}
  45. //
  46. //int main (int argc, char **argv) {
  47. //    glutInit (&argc, argv);
  48. //  glutInitDisplayMode (GLUT_SINGLE); // single buffering.. (double buffering for animation)
  49. //  // full screen is 1000,1000
  50. //  // this 0,0 or 1000,1000 are world co ordinates
  51. //  glutInitWindowSize (600,600);
  52. //  glutInitWindowPosition (100, 100);
  53. //    glutCreateWindow ("Star drawing using OpenGL");
  54. //  // registering callback functions
  55. //    glutDisplayFunc (display);  
  56. //  glutReshapeFunc (reshape);
  57. // 
  58. //    glutMainLoop ();
  59. //    return 0;
  60. //}
Add Comment
Please, Sign In to add comment