A bunch of things
- s_interrupt - allows sounds to be interrupted by the same sound or entity channel - new dynamic light calculation for vertex lighting, affecting vertex color (no projected dlight textures) - rgbGen material for allowing calculation for diffuse, specular, emmissive vertex colors by hex values - rgbMod shader command allowing new vertex color effects - removed deprecated R_ParseStageSimple, it never worked as intended - r_slowness gone. Use llvmpipe, PCem, or a slow computer instead. - Spring cleaning of old deprecated/broken post-process GLSL experiments - r_anime broke in 2015 - r_tvMode - well, shaderglass exists now - r_motionblur - Bad technique, too much memory - t_pslettize - slow, relies on shader's lookup of a vector table - r_film - bad on well-lit maps - r_retroAA - this broke early too. also looked bad. would rather implement FSAA 4x - cl_consoleScale : makes the console more 640x480 sized on any higher res. Also affects notify messages, so you can read chat easier - cl_consoleColor also affects the line at the bottom. Also new default colors - If consoleShader can't load (which will happen with some mods), it will fallback to a flat-colored console. - Generic'd the red/blue team names. We will not be having missionpack clans. - SDL2: Clicking the red X now does something: you can leave!!! If it sucks.... hit da bricks!! real winners quit - s_xmp_startPattern - makes the tracker song play a different pattern (for use with sub-songs) - fixed xmp playback as xmp explicitly requires a length of the module now. Fixes issue #96 - suppress the warning about non-22khz music, as mods are playing at the mixer's rate always, and this warning regards a much earlier (1999) unstable sound mixer. - deprecating r_modelshader because the shader got stale, old, buggy, and amd hates it now - r_shadeMethod will be something else (and not shader-based) - r_lightmapColorNorm : Make normalization of bright luxels an option, default is 1 (q3 behavior). - r_lightmapColorNorm 0 = no normalization, straight clamp, like Nightdive's vision of Quake2 - r_lightmapColorNorm 2 = experiment: normalize, but add some luminance on while maintaining the hue by normalizing again. This tries to restore more range on fully saturated colors - dropped SHADER_MAX_VERTEXES back to 1000 because raising it causes various unexpected issues, so dialing it down for now - raise MAX_IMAGE_ANIMATIONS to 16 because I've got a cool water shader using it and 8 is too choppy - Crash fix for older (<=2001) mods by trimming the string shared with ui module, so no overflow for them - jettisoning old proposed mme particle system that was never ever hooked up properly. - other small warning cleanup - r_shadeMethod : 0/1 = q3 behavior, 2 = ue1-ish behavior, 3 = mix of 1 and 2, -1 = one uniform color, 150-666 = a lod range to change between the 3 - r_monolightmaps : refactor - goes to the light data instead of the calculations and images - removed r_greyscale because this is a data-modifying novelty that would complicate support for loading compressed texture formats. This is better off as a post-process shader - environment mapping refactor, rewrite and cleanup - removed a lot of deprecated rgbGens - removed r_texdump (it never worked) - remove a few leftover broken postprocess things - Internal GLSL brightness shader, so gamma control can work without the glsl/brightness_fp.glsl file when r_ext_vertex_shader is 1 and r_alternateBrightness is 2. - r_skyTess - an attempt to make the complexity of skydomes an option so it could use less polygons. Has no effect on skyboxes
This commit is contained in:
@@ -51,12 +51,6 @@ typedef void *QGLContext;
|
||||
static QGLContext opengl_context;
|
||||
#endif
|
||||
|
||||
int tvMode; // leilei - tvmode
|
||||
int tvWidth;
|
||||
int tvHeight;
|
||||
int tvinterlace = 1; // leilei - interlace value for height
|
||||
float tvAspectW; // leilei - for aspect correction
|
||||
|
||||
//int vresWidth;
|
||||
//int vresHeight;
|
||||
|
||||
@@ -80,11 +74,6 @@ static const SDL_VideoInfo *videoInfo = NULL;
|
||||
#endif
|
||||
|
||||
cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained
|
||||
cvar_t *r_tvMode; // leilei - tv mode - force 480i rendering, which is then stretched and interlaced
|
||||
cvar_t *r_tvFilter; // leilei - tv filter
|
||||
cvar_t *r_tvModeAspect; // leilei - tv mode - to do widescreen and low res tv etc
|
||||
cvar_t *r_tvModeForceAspect; // leilei - tv mode - to force the screen into its native aspect
|
||||
cvar_t *r_motionblur; // leilei - moved here to set up accumulation bits
|
||||
cvar_t *r_allowResize; // make window resizable
|
||||
cvar_t *r_conMode; // leilei - console mode - force native resolutions of various consoles
|
||||
cvar_t *r_centerWindow;
|
||||
@@ -280,7 +269,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
int sdlcolorbits;
|
||||
int colorbits, depthbits, stencilbits;
|
||||
int tcolorbits, tdepthbits, tstencilbits;
|
||||
int accumbits; // leilei - motionblur
|
||||
int samples;
|
||||
int i = 0;
|
||||
SDL_Surface *icon = NULL;
|
||||
@@ -438,12 +426,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
stencilbits = r_stencilbits->value;
|
||||
samples = r_ext_multisample->value;
|
||||
|
||||
// leilei - motion blur via accumulation buffer support
|
||||
if (r_motionblur->integer == 1)
|
||||
accumbits = 16;
|
||||
else
|
||||
accumbits = 0;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
// 0 - default
|
||||
@@ -519,12 +501,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits );
|
||||
SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits );
|
||||
|
||||
// leilei - accumulation buffer motion blur
|
||||
SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, accumbits );
|
||||
SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, accumbits );
|
||||
SDL_GL_SetAttribute( SDL_GL_ACCUM_BLUE_SIZE, accumbits );
|
||||
SDL_GL_SetAttribute( SDL_GL_ACCUM_ALPHA_SIZE, accumbits );
|
||||
|
||||
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, samples ? 1 : 0 );
|
||||
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, samples );
|
||||
|
||||
@@ -651,12 +627,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// leilei - TV MODE
|
||||
//
|
||||
tvWidth = glConfig.vidWidth;
|
||||
tvHeight = glConfig.vidHeight;
|
||||
|
||||
vresWidth = glConfig.vidWidth;
|
||||
vresHeight = glConfig.vidHeight;
|
||||
|
||||
@@ -665,44 +635,10 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
|
||||
vresWidth = 640;
|
||||
vresHeight = 480;
|
||||
//tvAspectW = 1.0; // no change
|
||||
|
||||
if( r_tvMode->integer > -1){
|
||||
|
||||
|
||||
if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, r_tvMode->integer ) )
|
||||
{
|
||||
glConfig.vidWidth = 640; // if we can't do a mode then do this mode
|
||||
glConfig.vidHeight = 480;
|
||||
}
|
||||
|
||||
|
||||
if (glConfig.vidWidth > tvWidth) glConfig.vidWidth = tvWidth; // clamp
|
||||
if (glConfig.vidHeight > tvHeight) glConfig.vidHeight = tvHeight; // clamp
|
||||
|
||||
|
||||
// leilei - make it use an aspect-corrected lower resolution that's always 640 wide for the width, but variable height
|
||||
// then change the gl port..
|
||||
|
||||
vresWidth = tvWidth;
|
||||
vresHeight = tvHeight;
|
||||
|
||||
if( r_tvModeForceAspect->integer ){
|
||||
float ttw = (float)glConfig.vidWidth / ((float)tvWidth * (float)((float)glConfig.vidHeight/(float)tvHeight)); // 640 / 853 = 0.75 = ASPECT VALUE
|
||||
tvAspectW = ttw; // let's try this first to see if we can get it to our renderer
|
||||
//tvAspectW = 0.75f; // let's try this first to see if we can get it to our renderer
|
||||
}
|
||||
}
|
||||
// leilei - tv mode hack end
|
||||
#if SDL_MAJOR_VERSION != 2
|
||||
screen = vidscreen;
|
||||
#endif
|
||||
|
||||
if( r_tvModeAspect->integer ) {
|
||||
float aspe = 640.0f / tvWidth;
|
||||
glConfig.vidWidth = tvWidth * aspe;
|
||||
glConfig.vidHeight = tvHeight * aspe;
|
||||
}
|
||||
// then change the gl port..
|
||||
|
||||
glstring = (char *) qglGetString (GL_RENDERER);
|
||||
@@ -967,15 +903,6 @@ void GLimp_Init( void )
|
||||
r_sdlDriver = ri.Cvar_Get( "r_sdlDriver", "", CVAR_ROM );
|
||||
r_allowResize = ri.Cvar_Get( "r_allowResize", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||
r_centerWindow = ri.Cvar_Get( "r_centerWindow", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||
// leilei - tv mode hack
|
||||
r_tvMode = ri.Cvar_Get( "r_virtualMode", "-1", CVAR_LATCH | CVAR_ARCHIVE );
|
||||
r_tvModeAspect = ri.Cvar_Get( "r_tvModeAspect", "0", CVAR_LATCH | CVAR_ARCHIVE ); // yes
|
||||
r_tvModeForceAspect = ri.Cvar_Get( "r_tvModeForceAspect", "0", CVAR_LATCH | CVAR_ARCHIVE ); // yes
|
||||
|
||||
r_tvFilter = ri.Cvar_Get( "r_tvFilter", "1", CVAR_LATCH | CVAR_ARCHIVE );
|
||||
|
||||
// leilei - move motionblur cvar here to get it to not upset the other renderers when setting up an accumulation buffer
|
||||
r_motionblur = ri.Cvar_Get( "r_motionblur", "0", CVAR_LATCH | CVAR_ARCHIVE );
|
||||
|
||||
if( ri.Cvar_VariableIntegerValue( "com_abnormalExit" ) )
|
||||
{
|
||||
|
@@ -1204,6 +1204,7 @@ static void IN_ProcessEvents( void )
|
||||
case SDL_WINDOWEVENT_MAXIMIZED: Cvar_SetValue( "com_minimized", 0 ); break;
|
||||
case SDL_WINDOWEVENT_FOCUS_LOST: Cvar_SetValue( "com_unfocused", 1 ); break;
|
||||
case SDL_WINDOWEVENT_FOCUS_GAINED: Cvar_SetValue( "com_unfocused", 0 ); break;
|
||||
case SDL_WINDOWEVENT_CLOSE: Cbuf_ExecuteText(EXEC_NOW, "quit Closed window\n"); break;
|
||||
}
|
||||
break;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user