*** empty log message ***

svn path=/trunk/boinc/; revision=4912
This commit is contained in:
David Anderson 2004-12-21 06:05:44 +00:00
parent 409110463d
commit 779ee206b7
2 changed files with 29 additions and 16 deletions

View File

@ -86,15 +86,7 @@ static void close_func() {
}
static void make_new_window(int mode){
char* args[] = {"foobar", 0};
int one=1;
static bool first=true;
if (mode == MODE_WINDOW || mode == MODE_FULLSCREEN){
if (first) {
glutInit(&one, args);
first = false;
}
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(xpos, ypos);
glutInitWindowSize(600, 400);
@ -198,18 +190,32 @@ void restart() {
}
void xwin_graphics_event_loop() {
char* args[] = {"foobar", 0};
int one=1;
static bool first=true;
graphics_thread = pthread_self();
if (boinc_is_standalone()) {
set_mode(MODE_WINDOW);
} else {
wait_for_initial_message();
timer_handler(0);
atexit(restart);
int restarted = setjmp(jbuf);
#ifdef __APPLE_CC__
first = true;
#endif
if (first) {
glutInit(&one, args);
first = false;
}
int retval = setjmp(jbuf);
if (retval) {
if (restarted) {
//fprintf(stderr, "graphics thread restarted\n"); fflush(stderr);
set_mode(MODE_HIDE_GRAPHICS);
} else {
if (boinc_is_standalone()) {
set_mode(MODE_WINDOW);
} else {
wait_for_initial_message();
timer_handler(0);
atexit(restart);
}
}
glutTimerFunc(TIMER_INTERVAL_MSEC, timer_handler, 0);
glutMainLoop();

View File

@ -21695,3 +21695,10 @@ David 20 Dec 2004
sched/
handle_request.C
David 20 Dec 2004
- app graphics: on Mac, reinit GLUT on each restart
Bruce: please test
api/
x_opengl.C