/* ** InitOpenGL ** ** This function is responsible for initializing a valid OpenGL subsystem. This ** is done by calling GLimp_Init (which gives us a working OGL subsystem) then ** setting variables, checking GL constants, and reporting the gfx system config ** to the user. */ static void InitOpenGL( void ) { char renderer_buffer[1024]; // // initialize OS specific portions of the renderer // // GLimp_Init directly or indirectly references the following cvars: // - r_fullscreen // - r_mode // - r_(color|depth|stencil)bits // - r_ignorehwgamma // - r_gamma // if ( glConfig.vidWidth == 0 ) { GLint temp; GLimp_Init(); strcpy( renderer_buffer, glConfig.renderer_string ); Q_strlwr( renderer_buffer ); // OpenGL driver constants qglGetIntegerv( GL_MAX_TEXTURE_SIZE, &temp ); glConfig.maxTextureSize = temp; // stubbed or broken drivers may have reported 0... if ( glConfig.maxTextureSize <= 0 ) { glConfig.maxTextureSize = 0; } } // set default state GL_SetDefaultState(); }
/* ** InitOpenGL ** ** This function is responsible for initializing a valid OpenGL subsystem. This ** is done by calling GLimp_Init (which gives us a working OGL subsystem) then ** setting variables, checking GL constants, and reporting the gfx system config ** to the user. */ static void InitOpenGL( void ) { // // initialize OS specific portions of the renderer // // GLimp_Init directly or indirectly references the following cvars: // - r_fullscreen // - r_mode // - r_(color|depth|stencil)bits // - r_ignorehwgamma // - r_gamma // if ( glConfig.vidWidth == 0 ) { GLimp_Init(); // print info the first time only GL_SetDefaultState(); R_Splash(); //get something on screen asap GfxInfo_f(); } else { // set default state GL_SetDefaultState(); } // init command buffers and SMP R_InitCommandBuffers(); }
/* ** InitOpenGL ** ** This function is responsible for initializing a valid OpenGL subsystem. This ** is done by calling GLimp_Init (which gives us a working OGL subsystem) then ** setting variables, checking GL constants, and reporting the gfx system config ** to the user. */ static void InitOpenGL( void ) { char renderer_buffer[1024]; // // initialize OS specific portions of the renderer // // GLimp_Init directly or indirectly references the following cvars: // - r_fullscreen // - r_glDriver // - r_mode // - r_(color|depth|stencil)bits // - r_ignorehwgamma // - r_gamma // if ( !glState.initialized ) // @pjb: vdConfig.vidWidth == 0 is no longer a good indicator { GLint temp; GLimp_Init(); strcpy( renderer_buffer, vdConfig.renderer_string ); Q_strlwr( renderer_buffer ); // OpenGL driver constants qglGetIntegerv( GL_MAX_TEXTURE_SIZE, &temp ); vdConfig.maxTextureSize = temp; // stubbed or broken drivers may have reported 0... if ( vdConfig.maxTextureSize <= 0 ) { vdConfig.maxTextureSize = 0; } glState.initialized = qtrue; } // init command buffers and SMP R_InitCommandBuffers(); // print info GLRB_GfxInfo_f(); // set default state GL_SetDefaultState(); }
/* ** InitOpenGL ** ** This function is responsible for initializing a valid OpenGL subsystem. This ** is done by calling GLimp_Init (which gives us a working OGL subsystem) then ** setting variables, checking GL constants, and reporting the gfx system config ** to the user. */ static void InitOpenGL(void) { char renderer_buffer[1024]; /* * initialize OS specific portions of the renderer * * GLimp_Init directly or indirectly references the following cvars: * - r_fullscreen * - r_mode * - r_(color|depth|stencil)bits * - r_ignorehwgamma * - r_gamma * */ if(glConfig.vidWidth == 0){ GLint temp; GLimp_Init(); strcpy(renderer_buffer, glConfig.renderer_string); Q_strlwr(renderer_buffer); /* OpenGL driver constants */ qglGetIntegerv(GL_MAX_TEXTURE_SIZE, &temp); glConfig.maxTextureSize = temp; /* stubbed or broken drivers may have reported 0... */ if(glConfig.maxTextureSize <= 0){ glConfig.maxTextureSize = 0; } } /* init command buffers and SMP */ R_InitCommandBuffers(); /* print info */ GfxInfo_f(); /* set default state */ GL_SetDefaultState(); }