/* w4gl.c */ #include #include #include #include /* menu item numbers */ #define FILE_NEW 1 #define FILE_OPEN 2 #define FILE_PRINT 3 #define FILE_QUIT 4 #define ENTER_EASY 11 #define ENTER_COMPLETE 12 static int winWidth, winHeight; static int debug = 1; static void display(void) { int len, i; char msg[] = "right click for menu"; glClearColor(1.0, 1.0, 1.0, 1.0); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); /* view transform */ glLoadIdentity(); /* for future use */ glPushMatrix(); glColor3f(1.0, 0.0, 0.0); glRasterPos2f(0.0, 0.0); len = strlen(msg); for (i = 0; i