Files Classes Functions Hierarchy
00001 00002 #include <buttonpanel01test.h> 00003 #include <commandline.h> 00004 #include <graphmisc.h> 00005 00006 string buttonpanel01test::doc[] = 00007 { 00008 "", 00009 "- buttonpanel01test Prob: buttons and coord transforms." 00010 }; 00011 00012 void buttonpanel01test::keyboard01 00013 ( 00014 unsigned char key, 00015 int x, 00016 int y 00017 ) 00018 { 00019 switch (key) 00020 { 00021 case 27: exit(0); break; 00022 } 00023 00024 glutPostRedisplay(); 00025 } 00026 00027 00028 00029 void buttonpanel01test::display01() 00030 { 00031 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 00032 00033 assert(gobj::global); 00034 00035 gobj::global->draw(); 00036 00037 glerrordisplay(); 00038 00039 glutSwapBuffers(); 00040 } 00041 00042 buttonpanel01test::~buttonpanel01test() 00043 { 00044 delete zm; 00045 zm=0; 00046 delete zz; 00047 zz=0; 00048 delete bp; 00049 bp=0; 00050 } 00051 00052 00053 buttonpanel01test::buttonpanel01test(int argc, char** argv) 00054 : xGraphics(true) 00055 { 00056 glutInit(&argc,argv); 00057 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); 00058 glutInitWindowSize(800,600); 00059 glutCreateWindow(""); 00060 glutDisplayFunc(buttonpanel01test::display01); 00061 glutKeyboardFunc(buttonpanel01test::keyboard01); 00062 00063 OpenGLinitialisation(); 00064 00065 glEnable(GL_DEPTH_TEST); 00066 glEnable(GL_CULL_FACE); 00067 glEnable(GL_NORMALIZE); 00068 00069 xGraphics.set(); 00070 00071 gobjpush(new myaxes(1.0)); 00072 00073 commandline cmd(argc,argv); 00074 00075 zz = new zpr(); 00076 zz->update(); 00077 00078 zm = new zprmouse(*zz); 00079 bp = new buttonpanel01(zm); 00080 00081 gobjpush(bp); 00082 00083 glutMainLoop(); 00084 } 00085 00086
1.5.8