Cleanup.
This commit is contained in:
parent
1b46128499
commit
dd372cad1b
|
|
@ -650,10 +650,7 @@ void GLimp_Init( void )
|
||||||
|
|
||||||
ri.Printf( PRINT_ALL, "Initializing OpenGL subsystem\n" );
|
ri.Printf( PRINT_ALL, "Initializing OpenGL subsystem\n" );
|
||||||
|
|
||||||
// save off hInstance and wndproc
|
// save wndproc
|
||||||
cv = ri.Cvar_Get( "win_hinstance", "", 0 );
|
|
||||||
sscanf( cv->string, "%p", (void **)&g_wv.hInstance );
|
|
||||||
|
|
||||||
cv = ri.Cvar_Get( "win_wndproc", "", 0 );
|
cv = ri.Cvar_Get( "win_wndproc", "", 0 );
|
||||||
sscanf( cv->string, "%p", (void **)&glw_state.wndproc );
|
sscanf( cv->string, "%p", (void **)&glw_state.wndproc );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1089,7 +1089,6 @@ void Sys_Init( void ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// save out a couple things in rom cvars for the renderer to access
|
// save out a couple things in rom cvars for the renderer to access
|
||||||
Cvar_Get( "win_hinstance", va("%p", (void*)g_wv.hInstance), CVAR_ROM );
|
|
||||||
Cvar_Get( "win_wndproc", va("%p", MainWndProc), CVAR_ROM );
|
Cvar_Get( "win_wndproc", va("%p", MainWndProc), CVAR_ROM );
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -249,20 +249,7 @@ LONG WINAPI MainWndProc (
|
||||||
r_fullscreen = Cvar_Get ("r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_fullscreen = Cvar_Get ("r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case WM_DISPLAYCHANGE:
|
|
||||||
Com_DPrintf( "WM_DISPLAYCHANGE\n" );
|
|
||||||
// we need to force a vid_restart if the user has changed
|
|
||||||
// their desktop resolution while the game is running,
|
|
||||||
// but don't do anything if the message is a result of
|
|
||||||
// our own calling of ChangeDisplaySettings
|
|
||||||
if ( com_insideVidInit ) {
|
|
||||||
break; // we did this on purpose
|
|
||||||
}
|
|
||||||
// something else forced a mode change, so restart all our gl stuff
|
|
||||||
Cbuf_AddText( "vid_restart\n" );
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
// let sound and input know about this?
|
// let sound and input know about this?
|
||||||
g_wv.hWnd = NULL;
|
g_wv.hWnd = NULL;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ cvar_t *r_measureOverdraw;
|
||||||
|
|
||||||
cvar_t *r_inGameVideo;
|
cvar_t *r_inGameVideo;
|
||||||
cvar_t *r_fastsky;
|
cvar_t *r_fastsky;
|
||||||
cvar_t *r_drawSun;
|
|
||||||
cvar_t *r_dynamiclight;
|
cvar_t *r_dynamiclight;
|
||||||
cvar_t *r_dlightBacks;
|
cvar_t *r_dlightBacks;
|
||||||
|
|
||||||
|
|
@ -756,7 +755,6 @@ void GfxInfo_f( void )
|
||||||
ri.Printf( PRINT_ALL, "\nGL_VENDOR: %s\n", glConfig.vendor_string );
|
ri.Printf( PRINT_ALL, "\nGL_VENDOR: %s\n", glConfig.vendor_string );
|
||||||
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glConfig.renderer_string );
|
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glConfig.renderer_string );
|
||||||
ri.Printf( PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );
|
ri.Printf( PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );
|
||||||
ri.Printf( PRINT_ALL, "GL_EXTENSIONS: %s\n", glConfig.extensions_string );
|
|
||||||
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );
|
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );
|
||||||
ri.Printf( PRINT_ALL, "GL_MAX_ACTIVE_TEXTURES_ARB: %d\n", glConfig.maxActiveTextures );
|
ri.Printf( PRINT_ALL, "GL_MAX_ACTIVE_TEXTURES_ARB: %d\n", glConfig.maxActiveTextures );
|
||||||
ri.Printf( PRINT_ALL, "\nPIXELFORMAT: color(%d-bits) Z(%d-bit) stencil(%d-bits)\n", glConfig.colorBits, glConfig.depthBits, glConfig.stencilBits );
|
ri.Printf( PRINT_ALL, "\nPIXELFORMAT: color(%d-bits) Z(%d-bit) stencil(%d-bits)\n", glConfig.colorBits, glConfig.depthBits, glConfig.stencilBits );
|
||||||
|
|
@ -803,12 +801,7 @@ void R_Register( void )
|
||||||
r_ext_compressed_textures = ri.Cvar_Get( "r_ext_compressed_textures", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
r_ext_compressed_textures = ri.Cvar_Get( "r_ext_compressed_textures", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_ext_gamma_control = ri.Cvar_Get( "r_ext_gamma_control", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_ext_gamma_control = ri.Cvar_Get( "r_ext_gamma_control", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_ext_compiled_vertex_array = ri.Cvar_Get( "r_ext_compiled_vertex_array", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
r_ext_compiled_vertex_array = ri.Cvar_Get( "r_ext_compiled_vertex_array", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
||||||
#ifdef __linux__ // broken on linux
|
|
||||||
r_ext_texture_env_add = ri.Cvar_Get( "r_ext_texture_env_add", "0", CVAR_ARCHIVE | CVAR_LATCH);
|
|
||||||
#else
|
|
||||||
r_ext_texture_env_add = ri.Cvar_Get( "r_ext_texture_env_add", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
r_ext_texture_env_add = ri.Cvar_Get( "r_ext_texture_env_add", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
||||||
#endif
|
|
||||||
|
|
||||||
r_picmip = ri.Cvar_Get ("r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_picmip = ri.Cvar_Get ("r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_roundImagesDown = ri.Cvar_Get ("r_roundImagesDown", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_roundImagesDown = ri.Cvar_Get ("r_roundImagesDown", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_colorMipLevels = ri.Cvar_Get ("r_colorMipLevels", "0", CVAR_LATCH );
|
r_colorMipLevels = ri.Cvar_Get ("r_colorMipLevels", "0", CVAR_LATCH );
|
||||||
|
|
@ -816,11 +809,7 @@ void R_Register( void )
|
||||||
r_detailTextures = ri.Cvar_Get( "r_detailtextures", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_detailTextures = ri.Cvar_Get( "r_detailtextures", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_texturebits = ri.Cvar_Get( "r_texturebits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
r_texturebits = ri.Cvar_Get( "r_texturebits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_stereo = ri.Cvar_Get( "r_stereo", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
r_stereo = ri.Cvar_Get( "r_stereo", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
#ifdef __linux__
|
|
||||||
r_stencilbits = ri.Cvar_Get( "r_stencilbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
|
||||||
#else
|
|
||||||
r_stencilbits = ri.Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE | CVAR_LATCH );
|
r_stencilbits = ri.Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
#endif
|
|
||||||
r_depthbits = ri.Cvar_Get( "r_depthbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
r_depthbits = ri.Cvar_Get( "r_depthbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH);
|
r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH);
|
||||||
|
|
@ -833,12 +822,7 @@ void R_Register( void )
|
||||||
r_vertexLight = ri.Cvar_Get( "r_vertexLight", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
r_vertexLight = ri.Cvar_Get( "r_vertexLight", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_uiFullScreen = ri.Cvar_Get( "r_uifullscreen", "0", 0);
|
r_uiFullScreen = ri.Cvar_Get( "r_uifullscreen", "0", 0);
|
||||||
r_subdivisions = ri.Cvar_Get ("r_subdivisions", "4", CVAR_ARCHIVE | CVAR_LATCH);
|
r_subdivisions = ri.Cvar_Get ("r_subdivisions", "4", CVAR_ARCHIVE | CVAR_LATCH);
|
||||||
#if (defined(MACOS_X) || defined(__linux__)) && defined(SMP)
|
|
||||||
// Default to using SMP on Mac OS X or Linux if we have multiple processors
|
|
||||||
r_smp = ri.Cvar_Get( "r_smp", Sys_ProcessorCount() > 1 ? "1" : "0", CVAR_ARCHIVE | CVAR_LATCH);
|
|
||||||
#else
|
|
||||||
r_smp = ri.Cvar_Get( "r_smp", "0", CVAR_ARCHIVE | CVAR_LATCH);
|
r_smp = ri.Cvar_Get( "r_smp", "0", CVAR_ARCHIVE | CVAR_LATCH);
|
||||||
#endif
|
|
||||||
r_ignoreFastPath = ri.Cvar_Get( "r_ignoreFastPath", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
r_ignoreFastPath = ri.Cvar_Get( "r_ignoreFastPath", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -862,7 +846,6 @@ void R_Register( void )
|
||||||
r_ignoreGLErrors = ri.Cvar_Get( "r_ignoreGLErrors", "1", CVAR_ARCHIVE );
|
r_ignoreGLErrors = ri.Cvar_Get( "r_ignoreGLErrors", "1", CVAR_ARCHIVE );
|
||||||
r_fastsky = ri.Cvar_Get( "r_fastsky", "0", CVAR_ARCHIVE );
|
r_fastsky = ri.Cvar_Get( "r_fastsky", "0", CVAR_ARCHIVE );
|
||||||
r_inGameVideo = ri.Cvar_Get( "r_inGameVideo", "1", CVAR_ARCHIVE );
|
r_inGameVideo = ri.Cvar_Get( "r_inGameVideo", "1", CVAR_ARCHIVE );
|
||||||
r_drawSun = ri.Cvar_Get( "r_drawSun", "0", CVAR_ARCHIVE );
|
|
||||||
r_dynamiclight = ri.Cvar_Get( "r_dynamiclight", "1", CVAR_ARCHIVE );
|
r_dynamiclight = ri.Cvar_Get( "r_dynamiclight", "1", CVAR_ARCHIVE );
|
||||||
r_dlightBacks = ri.Cvar_Get( "r_dlightBacks", "1", CVAR_ARCHIVE );
|
r_dlightBacks = ri.Cvar_Get( "r_dlightBacks", "1", CVAR_ARCHIVE );
|
||||||
r_finish = ri.Cvar_Get ("r_finish", "0", CVAR_ARCHIVE);
|
r_finish = ri.Cvar_Get ("r_finish", "0", CVAR_ARCHIVE);
|
||||||
|
|
|
||||||
|
|
@ -1008,7 +1008,6 @@ extern cvar_t *r_lodscale;
|
||||||
|
|
||||||
extern cvar_t *r_inGameVideo; // controls whether in game video should be draw
|
extern cvar_t *r_inGameVideo; // controls whether in game video should be draw
|
||||||
extern cvar_t *r_fastsky; // controls whether sky should be cleared or drawn
|
extern cvar_t *r_fastsky; // controls whether sky should be cleared or drawn
|
||||||
extern cvar_t *r_drawSun; // controls drawing of sun quad
|
|
||||||
extern cvar_t *r_dynamiclight; // dynamic lights enabled/disabled
|
extern cvar_t *r_dynamiclight; // dynamic lights enabled/disabled
|
||||||
extern cvar_t *r_dlightBacks; // dlight non-facing surfaces for continuity
|
extern cvar_t *r_dlightBacks; // dlight non-facing surfaces for continuity
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user