Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#include <GL/glut.h>
- //
- //void star() {
- //
- // glColor3f(1, 1, 1);
- // glBegin(GL_LINE_LOOP);
- // glVertex3f(-0.8, 0, 0);
- // glColor3f(1, 0, 0);
- // glVertex3f(0.8, 0, 0);
- // glColor3f(0, 1, 0);
- // glVertex3f(-.6, -0.8, 0);
- // glColor3f(0, 1, 0);
- // glVertex3f(0.0,.5, 0);
- // glColor3f(0, 0, 1);
- // glVertex3f(.6, -0.8, 0);
- // glEnd();
- //
- //}
- //
- //void display() {
- //
- // glClearColor (0,0,0,1);
- // glClear (GL_COLOR_BUFFER_BIT);
- // glLoadIdentity();
- // gluLookAt (0, 0, 5, 0, 0, 0, 0, 1, 0);
- // star();
- // glFlush();
- //}
- //
- //void reshape (int w, int h) {
- //
- ////Set the viewport to be the entire window
- // glViewport (0, 0, (GLsizei)w, (GLsizei)h);
- //
- // // setting the camera
- // glMatrixMode (GL_PROJECTION);
- // glLoadIdentity ();
- //
- // //perspective transform
- // //gluPerspective (30, (GLfloat)w / (GLfloat)h, 1.0, 100.0);
- // gluPerspective (30, 1, 1.0, 100.0);
- // glMatrixMode (GL_MODELVIEW); //switch back the the model editing mode.
- //
- //}
- //
- //int main (int argc, char **argv) {
- // glutInit (&argc, argv);
- // glutInitDisplayMode (GLUT_SINGLE); // single buffering.. (double buffering for animation)
- // // full screen is 1000,1000
- // // this 0,0 or 1000,1000 are world co ordinates
- // glutInitWindowSize (600,600);
- // glutInitWindowPosition (100, 100);
- // glutCreateWindow ("Star drawing using OpenGL");
- // // registering callback functions
- // glutDisplayFunc (display);
- // glutReshapeFunc (reshape);
- //
- // glutMainLoop ();
- // return 0;
- //}
Add Comment
Please, Sign In to add comment