Files Classes Functions Hierarchy
#include <iostream>#include <GL/glut.h>
Go to the source code of this file.
Functions | |
| void | mainInit () |
| void | mainDisplay () |
| void | mainReshape (int w, int h) |
| void | mainAnimate () |
| int | main (int argc, char **argv) |
Variables | |
| GLfloat | mainspin = 0.0 |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 53 of file main.cpp.
References mainAnimate(), mainDisplay(), mainInit(), and mainReshape().
00054 { 00055 glutInit(&argc,argv); 00056 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); 00057 glutInitWindowSize(250,250); 00058 00059 glutCreateWindow(argv[0]); 00060 mainInit(); 00061 00062 glutDisplayFunc(mainDisplay); 00063 glutReshapeFunc(mainReshape); 00064 glutIdleFunc(mainAnimate); 00065 00066 glutMainLoop(); 00067 return 0; 00068 }
| void mainAnimate | ( | ) |
| void mainDisplay | ( | ) |
Definition at line 13 of file main.cpp.
References mainspin.
Referenced by main().
00014 { 00015 glClear(GL_COLOR_BUFFER_BIT); 00016 glPushMatrix(); 00017 00018 glRotatef(mainspin,0.0,0.0,1.0); 00019 glColor3f(1.0,0.0,0.0); 00020 00021 glBegin(GL_TRIANGLES); 00022 00023 glVertex2f(-0.5,0.0); 00024 glVertex2f(0.0,1.0); 00025 glVertex2f(0.5,0.0); 00026 00027 glEnd(); 00028 00029 glPopMatrix(); 00030 glutSwapBuffers(); 00031 }
| void mainInit | ( | ) |
| void mainReshape | ( | int | w, | |
| int | h | |||
| ) |
| GLfloat mainspin = 0.0 |
1.5.8