#include #include using namespace std; void disp(void); void drawAxis(void); int main(int argc,char **argv){ glutInit(&argc,argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE); glutCreateWindow("Axis1"); glClearColor(0.0,0.0,0.0,0.0); glutDisplayFunc(disp); glutMainLoop(); } void disp(void){ glClear(GL_COLOR_BUFFER_BIT); drawAxis(); glutSwapBuffers(); } void drawAxis(){ glBegin(GL_LINES); glColor3f(1.0,0.0,0.0); glVertex3f(0.0,0.0,0.0); glVertex3f(0.80,0.0,0.0); glColor3f(0.0,1.0,0.0); glVertex3f(0.0,0.0,0.0); glVertex3f(0.0,0.80,0.0); glColor3f(0.0,0.0,1.0); glVertex3f(0.0,0.0,0.0); glVertex3f(0.0,0.0,0.80); glEnd(); }