From ced6ac5aa9a27093d062558f11a82d3bd1550e57 Mon Sep 17 00:00:00 2001 From: Noaa Avital Date: Thu, 29 Jul 2004 20:42:37 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3960 --- api/x_opengl.C | 28 ++++++++++++---------------- checkin_notes | 10 ++++++++++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/api/x_opengl.C b/api/x_opengl.C index 69a4b7cbf8..d2e887fb8e 100644 --- a/api/x_opengl.C +++ b/api/x_opengl.C @@ -90,6 +90,7 @@ void onIdle(){ double currentTime = dtime(); if(userclose == 1){ + fprintf(stderr, "userclose happened, now = 0"); userclose = 0; set_mode(MODE_HIDE_GRAPHICS); } @@ -101,21 +102,9 @@ void onIdle(){ static void make_new_window(int mode){ - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - - if (mode == MODE_FULLSCREEN){ - win = glutCreateWindow(aid.app_name); - glutKeyboardFunc(keyboardD); - glutKeyboardUpFunc(keyboardU); - glutMouseFunc(mouse_click); - glutMotionFunc(mouse_click_move); - glutDisplayFunc(timer_handler); - glutIdleFunc(onIdle); - app_graphics_init(); - glEnable(GL_DEPTH_TEST); - - glutFullScreen(); - } else if(mode == MODE_WINDOW){ + if(mode == MODE_WINDOW || mode == MODE_FULLSCREEN){ + fprintf(stderr, "making a new window of mode = %d: xopen\n", mode); fflush(stderr); + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowPosition(xpos, ypos); glutInitWindowSize(gi.xsize, gi.ysize); boinc_get_init_data(aid); @@ -132,11 +121,15 @@ static void make_new_window(int mode){ app_graphics_init(); glEnable(GL_DEPTH_TEST); + + if(mode == MODE_FULLSCREEN) + glutFullScreen(); } } void set_mode(int mode) { + fprintf(stderr,"in set_mode, mode= %d\n", mode); fflush(stderr); if(current_graphics_mode == MODE_HIDE_GRAPHICS && mode == current_graphics_mode){ make_new_window(MODE_WINDOW); @@ -167,13 +160,16 @@ void set_mode(int mode) { } void* xwin_graphics_event_loop(void*){ - + + fprintf(stderr, "in xwin: x_open\n"); fflush(stderr); if (boinc_is_standalone()) { + printf("is standalone\n"); set_mode(MODE_WINDOW); } else { set_mode(MODE_HIDE_GRAPHICS); } + fprintf(stderr, "out of setmode, about to enter main loop\n");fflush(stderr); glutMainLoop(); return 0; } diff --git a/checkin_notes b/checkin_notes index 8fc492e48b..6f17fe5135 100755 --- a/checkin_notes +++ b/checkin_notes @@ -15728,3 +15728,13 @@ Daniel 2004-07-27 client/ app.C +Noaa 29 July 2004 + - added another glut file to the source tree, updated the + makefile for it + + boincglut/ + lib/ + glut/ + glut_glxext.c (new) + Makefile + \ No newline at end of file