/* ** GLW_LoadOpenGL ** ** GLimp_win.c internal function that that attempts to load and use ** a specific OpenGL DLL. */ static qboolean GLW_LoadOpenGL() { char name[1024]; qboolean fullscreen; strcpy( name, OPENGL_DRIVER_NAME ); ri.Printf( PRINT_ALL, "...loading %s: ", name ); // disable the 3Dfx splash screen and set gamma // we do this all the time, but it shouldn't hurt anything // on non-3Dfx stuff putenv("FX_GLIDE_NO_SPLASH=0"); // Mesa VooDoo hacks putenv("MESA_GLX_FX=fullscreen\n"); // load the QGL layer if ( QGL_Init( name ) ) { fullscreen = (r_fullscreen->integer) ? qtrue : qfalse; // create the window and set up the context if ( !GLW_StartDriverAndSetMode( name, r_mode->integer, fullscreen ) ) { if (r_mode->integer != 3) { if ( !GLW_StartDriverAndSetMode( name, 3, fullscreen ) ) { goto fail; } } else goto fail; } return qtrue; } else { ri.Printf( PRINT_ALL, "failed\n" ); } fail: QGL_Shutdown(); return qfalse; }
/* ** GLW_LoadOpenGL ** ** GLimp_win.c internal function that that attempts to load and use ** a specific OpenGL DLL. */ static qboolean GLW_LoadOpenGL() { char buffer[1024]; qboolean fullscreen; #ifdef HAVE_GLES strcpy( buffer, "libGLES_CM.so" ); #else strcpy( buffer, OPENGL_DRIVER_NAME ); #endif VID_Printf( PRINT_ALL, "...loading %s: ", buffer ); // load the QGL layer if ( QGL_Init( buffer ) ) { #ifdef HAVE_GLES fullscreen = qtrue; #else fullscreen = r_fullscreen->integer; #endif // create the window and set up the context if ( !GLW_StartDriverAndSetMode( buffer, r_mode->integer, fullscreen ) ) { if (r_mode->integer != 3) { if ( !GLW_StartDriverAndSetMode( buffer, 3, fullscreen ) ) { goto fail; } } else goto fail; } return qtrue; } else { VID_Printf( PRINT_ALL, "failed\n" ); } fail: QGL_Shutdown(); return qfalse; }
/* ** GLW_LoadOpenGL ** ** GLimp_win.c internal function that that attempts to load and use ** a specific OpenGL DLL. */ static qboolean GLW_LoadOpenGL( const char *name ) { qboolean fullscreen; ri.Printf( PRINT_ALL, "...loading %s: ", name ); #ifndef HAVE_GLES // disable the 3Dfx splash screen and set gamma // we do this all the time, but it shouldn't hurt anything // on non-3Dfx stuff putenv( "FX_GLIDE_NO_SPLASH=0" ); // Mesa VooDoo hacks putenv( "MESA_GLX_FX=fullscreen\n" ); #endif // load the QGL layer if ( QGL_Init( name ) ) { #ifdef PANDORA fullscreen = 1; #else fullscreen = r_fullscreen->integer; #endif // create the window and set up the context if ( !GLW_StartDriverAndSetMode( name, r_mode->integer, fullscreen ) ) { if ( r_mode->integer != 3 ) { if ( !GLW_StartDriverAndSetMode( name, 3, fullscreen ) ) { goto fail; } } else { goto fail; } } return qtrue; } else { ri.Printf( PRINT_ALL, "failed\n" ); } fail: QGL_Shutdown(); return qfalse; }
/* ** GLW_LoadOpenGL ** ** GLimp_win.c internal function that attempts to load and use ** a specific OpenGL DLL. */ static qboolean GLW_LoadOpenGL( ) { char buffer[1024]; qboolean cdsFullscreen; Q_strlwr( strcpy( buffer, OPENGL_DRIVER_NAME ) ); // // load the driver and bind our function pointers to it // if ( QGL_Init( buffer ) ) { cdsFullscreen = (qboolean)r_fullscreen->integer; // create the window and set up the context if ( !GLW_StartDriverAndSetMode( r_mode->integer, r_colorbits->integer, cdsFullscreen ) ) { // if we're on a 24/32-bit desktop and we're going fullscreen on an ICD, // try it again but with a 16-bit desktop if ( r_colorbits->integer != 16 || cdsFullscreen != qtrue || r_mode->integer != 3 ) { if ( !GLW_StartDriverAndSetMode( 3, 16, qtrue ) ) { goto fail; } } } return qtrue; } fail: QGL_Shutdown(); return qfalse; }
/* ** GLW_LoadOpenGL ** ** GLimp_win.c internal function that attempts to load and use ** a specific OpenGL DLL. */ static qboolean GLW_LoadOpenGL( const char *drivername ) { char buffer[1024]; qboolean cdsFullscreen; Q_strncpyz( buffer, drivername, sizeof(buffer) ); Q_strlwr(buffer); // // determine if we're on a standalone driver // if ( strstr( buffer, "opengl32" ) != 0 || r_maskMinidriver->integer ) { glConfig.driverType = GLDRV_ICD; } else { glConfig.driverType = GLDRV_STANDALONE; ri.Printf( PRINT_ALL, "...assuming '%s' is a standalone driver\n", drivername ); if ( strstr( buffer, _3DFX_DRIVER_NAME ) ) { glConfig.driverType = GLDRV_VOODOO; } } // disable the 3Dfx splash screen _putenv("FX_GLIDE_NO_SPLASH=0"); // // load the driver and bind our function pointers to it // if ( QGL_Init( buffer ) ) { cdsFullscreen = r_fullscreen->integer; // create the window and set up the context if ( !GLW_StartDriverAndSetMode( drivername, r_mode->integer, r_colorbits->integer, cdsFullscreen ) ) { // if we're on a 24/32-bit desktop and we're going fullscreen on an ICD, // try it again but with a 16-bit desktop if ( glConfig.driverType == GLDRV_ICD ) { if ( r_colorbits->integer != 16 || cdsFullscreen != qtrue || r_mode->integer != 3 ) { if ( !GLW_StartDriverAndSetMode( drivername, 3, 16, qtrue ) ) { goto fail; } } } else { goto fail; } } if ( glConfig.driverType == GLDRV_VOODOO ) { glConfig.isFullscreen = qtrue; } return qtrue; } fail: QGL_Shutdown(); return qfalse; }