Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void display(void)
- {
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(40,1,near,far);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- gluLookAt(0.0, 2.0, -3.0, 0.0, 0.0, 10.0, 0.0, 1.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
- glPushMatrix();
- glColor3f (0.0, 0.0, 0.0);
- glTranslatef(golfball.getpx(),golfball.getpy(),startdispz - golfball.getpz());
- glutSolidSphere(golfball.getballsize(),20,20);
- glPopMatrix();
- glPushMatrix();
- glColor3f (0.0, 1.0, 0.0);
- glTranslatef(0,0.0,-7.5);
- glRotatef(90, 1.0, 0.0, 0.0);
- drawCircle(0.1,24);
- glRotatef(-90, 1.0, 0.0, 0.0);
- glPopMatrix();
- glFlush();
- glutSwapBuffers();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement