- an attempt at sorting and restructuring tr_bloom.c
- NTSC filter support - added some rgbGen that has entity colors AND lighting, so colorable players don't have to glow - broken image loading time for imagelist
This commit is contained in:
@@ -28,6 +28,9 @@ BUILD_RENDERER_OPENGL2=0
|
||||
# You can disable the renderer libraries and build in the OA renderer by default
|
||||
USE_RENDERER_DLOPEN=1
|
||||
|
||||
# renderer_oa - This causes compiling issues on Linux and does not work yet.
|
||||
USE_FALLBACK_GLSL=0
|
||||
|
||||
# You can change these although you probably don't need to
|
||||
CLIENTBIN=openarena
|
||||
SERVERBIN=oa_ded
|
||||
|
@@ -1401,6 +1401,9 @@ typedef enum _flag_status {
|
||||
} flagStatus_t;
|
||||
|
||||
|
||||
// leilei - virtual res
|
||||
int vresWidth;
|
||||
int vresHeight;
|
||||
|
||||
#define MAX_GLOBAL_SERVERS 4096
|
||||
#define MAX_OTHER_SERVERS 128
|
||||
|
@@ -24,6 +24,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
backEndData_t *backEndData;
|
||||
backEndState_t backEnd;
|
||||
|
||||
float ScreenFrameCount;
|
||||
|
||||
static float s_flipMatrix[16] = {
|
||||
// convert from our coordinate system (looking down X)
|
||||
// to OpenGL's coordinate system (looking down -Z)
|
||||
@@ -1088,6 +1090,9 @@ RB_SetGL2D
|
||||
extern int tvWidth;
|
||||
extern int tvHeight;
|
||||
|
||||
extern int vresWidth;
|
||||
extern int vresHeight;
|
||||
|
||||
void RB_SetGL2D (void) {
|
||||
|
||||
backEnd.projection2D = qtrue;
|
||||
@@ -1651,6 +1656,8 @@ const void *RB_SwapBuffers( const void *data ) {
|
||||
if (r_ext_vertex_shader->integer){ // leilei - leifx filters
|
||||
R_LeiFXPostprocessDitherScreen();
|
||||
R_LeiFXPostprocessFilterScreen();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1659,6 +1666,9 @@ const void *RB_SwapBuffers( const void *data ) {
|
||||
}
|
||||
R_BrightScreen(); // leilei - alternate brightness - do it here so we hit evereything
|
||||
R_RetroAAScreen(); // leilei - then apply 'anti aliasing'
|
||||
|
||||
R_NTSCScreen();
|
||||
|
||||
R_TVScreen(); // leilei - tv operation comes last, this is a SCREEN
|
||||
|
||||
|
||||
@@ -1691,6 +1701,7 @@ const void *RB_SwapBuffers( const void *data ) {
|
||||
|
||||
GLimp_EndFrame();
|
||||
|
||||
ScreenFrameCount++;
|
||||
backEnd.projection2D = qfalse;
|
||||
|
||||
backEnd.doneBloom = qfalse;
|
||||
@@ -1704,6 +1715,7 @@ const void *RB_SwapBuffers( const void *data ) {
|
||||
backEnd.doneSurfaces = qfalse;
|
||||
backEnd.doneSun = qfalse;
|
||||
backEnd.doneSunFlare = qfalse;
|
||||
backEnd.donentsc = qfalse;
|
||||
backEnd.donetv = qfalse;
|
||||
backEnd.doneraa = qfalse;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -374,6 +374,7 @@ R_ImageList_f
|
||||
void R_ImageList_f( void ) {
|
||||
int i;
|
||||
int estTotalSize = 0;
|
||||
float estTotalTimeLoaded = 0;
|
||||
|
||||
ri.Printf(PRINT_ALL, "\n -w-- -h-- type -size- --name-------\n");
|
||||
|
||||
@@ -501,13 +502,17 @@ void R_ImageList_f( void ) {
|
||||
sizeSuffix = "Gb";
|
||||
}
|
||||
|
||||
ri.Printf(PRINT_ALL, "%4i: %4ix%4i %s %4i%s %s\n", i, image->uploadWidth, image->uploadHeight, format, displaySize, sizeSuffix, image->imgName);
|
||||
//ri.Printf(PRINT_ALL, "%4i: %4ix%4i %s %4i%s %s\n", i, image->uploadWidth, image->uploadHeight, format, displaySize, sizeSuffix, image->imgName);
|
||||
ri.Printf(PRINT_ALL, "%4i: %4ix%4i %s %4i%s %s %f %f\n", i, image->uploadWidth, image->uploadHeight, format, displaySize, sizeSuffix, image->imgName, image->loadTime, image->procTime);
|
||||
|
||||
estTotalSize += estSize;
|
||||
estTotalTimeLoaded += image->loadTime + image->procTime;
|
||||
}
|
||||
|
||||
ri.Printf (PRINT_ALL, " ---------\n");
|
||||
ri.Printf (PRINT_ALL, " approx %i bytes\n", estTotalSize);
|
||||
ri.Printf (PRINT_ALL, " %i total images\n\n", tr.numImages );
|
||||
ri.Printf (PRINT_ALL, " %f msec loaded\n\n", estTotalTimeLoaded );
|
||||
}
|
||||
|
||||
|
||||
@@ -1937,7 +1942,7 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height,
|
||||
qboolean isLightmap = qfalse;
|
||||
long hash;
|
||||
int glWrapClampMode;
|
||||
|
||||
float oldtime = backEnd.refdef.floatTime;
|
||||
if (strlen(name) >= MAX_QPATH ) {
|
||||
ri.Error (ERR_DROP, "R_CreateImage: \"%s\" is too long", name);
|
||||
}
|
||||
@@ -2021,6 +2026,7 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height,
|
||||
image->next = hashTable[hash];
|
||||
hashTable[hash] = image;
|
||||
|
||||
image->procTime = backEnd.refdef.floatTime - oldtime;
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -2143,6 +2149,9 @@ image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags )
|
||||
int width, height;
|
||||
byte *pic;
|
||||
long hash;
|
||||
float oldtime;
|
||||
float loadtime;
|
||||
float proctime;
|
||||
|
||||
if (!name) {
|
||||
return NULL;
|
||||
@@ -2184,15 +2193,23 @@ image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags )
|
||||
//
|
||||
// load the pic from disk
|
||||
//
|
||||
oldtime = backEnd.refdef.floatTime;
|
||||
R_LoadImage( name, &pic, &width, &height );
|
||||
if ( pic == NULL ) {
|
||||
return NULL;
|
||||
}
|
||||
loadtime = backEnd.refdef.floatTime - oldtime;
|
||||
|
||||
|
||||
image = R_CreateImage( ( char * ) name, pic, width, height, type, flags, 0 );
|
||||
|
||||
|
||||
|
||||
ri.Free( pic );
|
||||
|
||||
|
||||
image->loadTime = loadtime;
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
|
@@ -196,6 +196,8 @@ cvar_t *r_flaresDlight;
|
||||
cvar_t *r_alternateBrightness; // leilei - linux overbright fix
|
||||
cvar_t *r_mockvr; // Leilei - for debugging PVR only!
|
||||
cvar_t *r_leifx; // Leilei - leifx nostalgia filter
|
||||
|
||||
cvar_t *r_ntsc; // Leilei - ntsc / composite signals
|
||||
//cvar_t *r_tvMode; // Leilei - tv fake mode
|
||||
cvar_t *r_retroAA; // Leilei - old console AA
|
||||
cvar_t *r_anime; // Leilei - anime filter
|
||||
@@ -1256,6 +1258,8 @@ void R_Register( void )
|
||||
r_mockvr = ri.Cvar_Get( "r_mockvr", "0" , CVAR_ARCHIVE | CVAR_CHEAT);
|
||||
r_leifx = ri.Cvar_Get( "r_leifx", "0" , CVAR_ARCHIVE | CVAR_LATCH);
|
||||
|
||||
r_ntsc = ri.Cvar_Get( "r_ntsc", "0" , CVAR_ARCHIVE | CVAR_LATCH);
|
||||
|
||||
r_leiwater = ri.Cvar_Get( "r_leiwater", "0" , CVAR_ARCHIVE | CVAR_LATCH);
|
||||
|
||||
//r_tvMode = ri.Cvar_Get( "r_tvMode", "0" , CVAR_ARCHIVE | CVAR_LATCH);
|
||||
@@ -1343,6 +1347,11 @@ static glslProgram_t *R_GLSL_AllocProgram(void) {
|
||||
program->u_mpass4 = -1;
|
||||
|
||||
|
||||
program->rubyTextureSize = -1;
|
||||
program->rubyInputSize = -1;
|
||||
program->rubyOutputSize = -1;
|
||||
program->rubyFrameCount = -1;
|
||||
|
||||
tr.programs[tr.numPrograms] = program;
|
||||
tr.numPrograms++;
|
||||
|
||||
@@ -1439,6 +1448,18 @@ void R_GLSL_Init(void) {
|
||||
Q_strncpyz(programFragmentObjects[0], "glsl/crt_fp.glsl", sizeof(programFragmentObjects[0]));
|
||||
tr.CRTProgram = RE_GLSL_RegisterProgram("crt", (const char *)programVertexObjects, 1, (const char *)programFragmentObjects, 1);
|
||||
|
||||
Q_strncpyz(programVertexObjects[0], "glsl/ntsc_encode_vp.glsl", sizeof(programVertexObjects[0]));
|
||||
Q_strncpyz(programFragmentObjects[0], "glsl/ntsc_encode_fp.glsl", sizeof(programFragmentObjects[0]));
|
||||
tr.NTSCEncodeProgram = RE_GLSL_RegisterProgram("ntsc_encode", (const char *)programVertexObjects, 1, (const char *)programFragmentObjects, 1);
|
||||
|
||||
Q_strncpyz(programVertexObjects[0], "glsl/ntsc_decode_vp.glsl", sizeof(programVertexObjects[0]));
|
||||
Q_strncpyz(programFragmentObjects[0], "glsl/ntsc_decode_fp.glsl", sizeof(programFragmentObjects[0]));
|
||||
tr.NTSCDecodeProgram = RE_GLSL_RegisterProgram("ntsc_decode", (const char *)programVertexObjects, 1, (const char *)programFragmentObjects, 1);
|
||||
|
||||
Q_strncpyz(programVertexObjects[0], "glsl/ntsc_bleed_vp.glsl", sizeof(programVertexObjects[0]));
|
||||
Q_strncpyz(programFragmentObjects[0], "glsl/ntsc_bleed_fp.glsl", sizeof(programFragmentObjects[0]));
|
||||
tr.NTSCBleedProgram = RE_GLSL_RegisterProgram("ntsc_bleed", (const char *)programVertexObjects, 1, (const char *)programFragmentObjects, 1);
|
||||
|
||||
if (strcmp( (const char *)r_postprocess->string, "none" ))
|
||||
{
|
||||
sprintf(p,"glsl/%s_vp.glsl",r_postprocess->string);
|
||||
|
@@ -184,7 +184,8 @@ typedef enum {
|
||||
CGEN_LIGHTING_FLAT_AMBIENT, // leilei - cel hack
|
||||
CGEN_LIGHTING_FLAT_DIRECT,
|
||||
CGEN_FOG, // standard fog
|
||||
CGEN_CONST // fixed color
|
||||
CGEN_CONST, // fixed color
|
||||
CGEN_VERTEX_LIT // leilei - tess.vertexColors * tr.identityLight * ambientlight*directlight
|
||||
} colorGen_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -860,6 +861,19 @@ typedef struct {
|
||||
GLint u_mpasses; // How many passes of Motion do we have anyhow?
|
||||
|
||||
|
||||
// leilei - 'compatibility' with ruby shader vars (HACK HACK HACK)
|
||||
|
||||
GLint rubyInputSize;
|
||||
vec3_t v_rubyInputSize;
|
||||
|
||||
GLint rubyOutputSize;
|
||||
vec3_t v_rubyOutputSize;
|
||||
|
||||
GLint rubyTextureSize;
|
||||
vec3_t v_rubyTextureSize;
|
||||
|
||||
GLfloat rubyFrameCount;
|
||||
|
||||
|
||||
// leilei - Color control
|
||||
|
||||
@@ -1029,6 +1043,7 @@ typedef struct {
|
||||
qboolean donewater; // leilei - done water this frame
|
||||
qboolean donetv; // leilei - tv this frame
|
||||
qboolean doneraa; // leilei - done aa'ing this frame
|
||||
qboolean donentsc; // leilei - done ntsc'ing this frame
|
||||
qboolean doneSurfaces; // done any 3d surfaces already
|
||||
trRefEntity_t entity2D; // currentEntity will point at this when doing 2D rendering
|
||||
} backEndState_t;
|
||||
@@ -1090,6 +1105,9 @@ typedef struct {
|
||||
qhandle_t motionBlurPostProgram; // leilei
|
||||
qhandle_t BrightnessProgram; // leilei
|
||||
qhandle_t CRTProgram; // leilei
|
||||
qhandle_t NTSCEncodeProgram; // leilei
|
||||
qhandle_t NTSCDecodeProgram; // leilei
|
||||
qhandle_t NTSCBleedProgram; // leilei
|
||||
|
||||
int numPrograms;
|
||||
glslProgram_t *programs[MAX_PROGRAMS];
|
||||
@@ -1297,7 +1315,10 @@ extern cvar_t *r_alternateBrightness; // leilei - alternate brightness
|
||||
extern cvar_t *r_leifx; // Leilei - leifx nostalgia filter
|
||||
extern cvar_t *r_leiwater; // Leilei - water test
|
||||
|
||||
extern cvar_t *r_ntsc; // Leilei - ntsc
|
||||
|
||||
extern cvar_t *r_tvMode; // Leilei - tv faking mode
|
||||
extern cvar_t *r_tvConsoleMode; // Leilei - tv faking mode
|
||||
|
||||
extern cvar_t *r_retroAA; // Leilei - old console anti aliasing
|
||||
|
||||
@@ -1838,6 +1859,35 @@ static ID_INLINE void R_GLSL_SetUniform_u_ActualScreenSizeY(glslProgram_t *progr
|
||||
}
|
||||
|
||||
|
||||
static ID_INLINE void R_GLSL_SetUniform_rubyTextureSize(glslProgram_t *program, const GLint value, const GLint valub) {
|
||||
// if (VectorCompare(program->v_rubyTextureSize, value))
|
||||
// return;
|
||||
// VectorCopy(value, program->v_rubyTextureSize);
|
||||
// program->v_rubyTextureSize[0] = value;
|
||||
// program->v_rubyTextureSize[1] = valub;
|
||||
// qglUniform3fARB(program->rubyTextureSize, value, valub, 1.0);
|
||||
}
|
||||
|
||||
static ID_INLINE void R_GLSL_SetUniform_rubyInputSize(glslProgram_t *program, const GLint value, const GLint valub) {
|
||||
// if (VectorCompare(program->v_rubyInputSize, value))
|
||||
// return;
|
||||
// program->v_rubyInputSize[0] = value;
|
||||
// program->v_rubyInputSize[1] = valub;
|
||||
//VectorCopy(vec2(value, valub), program->v_rubyInputSize);
|
||||
// qglUniform3fARB(program->rubyInputSize, value, valub, 1.0);
|
||||
}
|
||||
|
||||
static ID_INLINE void R_GLSL_SetUniform_rubyOutputSize(glslProgram_t *program, const GLint value, const GLint valub) {
|
||||
// if (VectorCompare(program->v_rubyOutputSize, value))
|
||||
// return;
|
||||
// VectorCopy(value, program->v_rubyOutputSize);
|
||||
// program->v_rubyOutputSize[0] = value;
|
||||
// program->v_rubyOutputSize[1] = valub;
|
||||
// qglUniform3fARB(program->rubyOutputSize, value, valub, 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static ID_INLINE void R_GLSL_SetUniform_Mpass1(glslProgram_t *program, GLint value) {qglUniform1iARB(program->u_mpass1, value);}
|
||||
static ID_INLINE void R_GLSL_SetUniform_Mpass2(glslProgram_t *program, GLint value) {qglUniform1iARB(program->u_mpass2, value);}
|
||||
static ID_INLINE void R_GLSL_SetUniform_Mpass3(glslProgram_t *program, GLint value) {qglUniform1iARB(program->u_mpass3, value);}
|
||||
@@ -2193,7 +2243,7 @@ void R_WaterInit( void );
|
||||
void R_BloomScreen( void );
|
||||
void R_WaterScreen( void );
|
||||
void R_AnimeScreen( void );
|
||||
|
||||
void R_NTSCScreen( void );
|
||||
// Postprocessing
|
||||
void R_PostprocessScreen( void );
|
||||
void R_PostprocessingInit(void);
|
||||
|
@@ -932,6 +932,37 @@ static void ComputeColors( shaderStage_t *pStage )
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CGEN_VERTEX_LIT: // leilei - mixing vertex colors with lighting through a glorious light hack
|
||||
{ // should only be used for entity models, not map assets!
|
||||
vec3_t dcolor, acolor; // to save the color from actual light
|
||||
vec3_t vcolor;
|
||||
int y;
|
||||
|
||||
|
||||
// Backup our colors
|
||||
VectorCopy( backEnd.currentEntity->ambientLight, acolor );
|
||||
VectorCopy( backEnd.currentEntity->directedLight, dcolor );
|
||||
VectorCopy( backEnd.currentEntity->e.shaderRGBA, vcolor );
|
||||
|
||||
// Make our vertex color take over
|
||||
|
||||
for(y=0;y<3;y++){
|
||||
backEnd.currentEntity->ambientLight[y] *= (vcolor[y] / 255);
|
||||
|
||||
if (backEnd.currentEntity->ambientLight[y] < 1) backEnd.currentEntity->ambientLight[y] = 1; // black!!!
|
||||
if (backEnd.currentEntity->ambientLight[y] > 255) backEnd.currentEntity->ambientLight[y] = 255; // white!!!!!
|
||||
// backEnd.currentEntity->ambientLight[y] *= (vcolor[y] / 255);
|
||||
// backEnd.currentEntity->directedLight[y] *= (vcolor[y] / 255);
|
||||
}
|
||||
|
||||
// run it through our favorite preferred lighting calculation functions
|
||||
RB_CalcDiffuseColor( ( unsigned char * ) tess.svars.colors );
|
||||
|
||||
// Restore light color for any other stage that doesn't do it
|
||||
VectorCopy( acolor, backEnd.currentEntity->ambientLight);
|
||||
VectorCopy( dcolor, backEnd.currentEntity->directedLight);
|
||||
}
|
||||
break;
|
||||
case CGEN_ONE_MINUS_VERTEX:
|
||||
if ( tr.identityLight == 1 )
|
||||
{
|
||||
|
@@ -139,6 +139,11 @@ static glslProgram_t *R_GLSL_AllocProgram(void) {
|
||||
program->u_ActualScreenSizeX = -1;
|
||||
program->u_ActualScreenSizeY = -1;
|
||||
|
||||
program->rubyInputSize = -1;
|
||||
program->rubyOutputSize = -1;
|
||||
program->rubyTextureSize = -1;
|
||||
program->rubyFrameCount = -1;
|
||||
|
||||
|
||||
tr.programs[tr.numPrograms] = program;
|
||||
tr.numPrograms++;
|
||||
@@ -257,6 +262,17 @@ static void R_GLSL_ParseProgram(glslProgram_t *program, char *_text) {
|
||||
} else {
|
||||
ri.Printf(PRINT_WARNING, "WARNING: uniform sampler2D %s unrecognized in program %s\n", token, program->name);
|
||||
}
|
||||
} else if (!Q_stricmp(token, "vec2")) {
|
||||
token = COM_ParseExt(text, qfalse);
|
||||
if (!Q_stricmp(token, "rubyTextureSize;")) {
|
||||
program->rubyTextureSize = qglGetUniformLocationARB(program->program, "rubyTextureSize");
|
||||
} else if (!Q_stricmp(token, "rubyInputSize;")) {
|
||||
program->rubyInputSize = qglGetUniformLocationARB(program->program, "rubyInputSize");
|
||||
} else if (!Q_stricmp(token, "rubyOutputSize;")) {
|
||||
program->rubyOutputSize = qglGetUniformLocationARB(program->program, "rubyOutputSize");
|
||||
} else {
|
||||
ri.Printf(PRINT_WARNING, "WARNING: uniform vec2 %s unrecognized in program %s\n", token, program->name);
|
||||
}
|
||||
} else if (!Q_stricmp(token, "vec3")) {
|
||||
token = COM_ParseExt(text, qfalse);
|
||||
if (!Q_stricmp(token, "u_AmbientLight;")) {
|
||||
@@ -2563,6 +2579,20 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
|
||||
{
|
||||
stage->rgbGen = CGEN_EXACT_VERTEX;
|
||||
}
|
||||
else if ( !Q_stricmp( token, "vertexLighting" ) ) // leilei - vertex WITH a lighting pass after
|
||||
{
|
||||
stage->rgbGen = CGEN_VERTEX_LIT;
|
||||
if ( stage->alphaGen == 0 ) {
|
||||
stage->alphaGen = AGEN_VERTEX;
|
||||
}
|
||||
}
|
||||
else if ( !Q_stricmp( token, "vertexLighting2" ) ) // leilei - second vertex color
|
||||
{
|
||||
stage->rgbGen = CGEN_VERTEX_LIT;
|
||||
if ( stage->alphaGen == 0 ) {
|
||||
stage->alphaGen = AGEN_VERTEX;
|
||||
}
|
||||
}
|
||||
else if ( !Q_stricmp( token, "lightingDiffuse" ) )
|
||||
{
|
||||
stage->rgbGen = CGEN_LIGHTING_DIFFUSE;
|
||||
|
@@ -64,6 +64,9 @@ typedef struct image_s {
|
||||
struct image_s* next;
|
||||
|
||||
qboolean maptexture; // leilei - map texture listing hack
|
||||
|
||||
float loadTime; // leilei - time taken loading image
|
||||
float procTime; // leilei - time taken processing image/uploading to vram
|
||||
} image_t;
|
||||
|
||||
// any change in the LIGHTMAP_* defines here MUST be reflected in
|
||||
|
@@ -54,6 +54,10 @@ int tvWidth;
|
||||
int tvHeight;
|
||||
int tvinterlace; // leilei - interlace value for height
|
||||
|
||||
//int vresWidth;
|
||||
//int vresHeight;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RSERR_OK,
|
||||
@@ -69,9 +73,11 @@ static const SDL_VideoInfo *videoInfo = NULL;
|
||||
|
||||
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_tvConsoleMode; // leilei - tv mode
|
||||
cvar_t *r_tvModeAspect; // leilei - tv mode - to do widescreen and low res tv etc
|
||||
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;
|
||||
cvar_t *r_sdlDriver;
|
||||
|
||||
@@ -469,6 +475,13 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
tvWidth = glConfig.vidWidth;
|
||||
tvHeight = glConfig.vidHeight;
|
||||
|
||||
vresWidth = glConfig.vidWidth;
|
||||
vresHeight = glConfig.vidHeight;
|
||||
|
||||
|
||||
vresWidth = 640;
|
||||
vresHeight = 480;
|
||||
|
||||
if( r_tvMode->integer ){
|
||||
|
||||
|
||||
@@ -486,10 +499,37 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||
|
||||
}
|
||||
// then change the gl port..
|
||||
//vidscreen = SDL_SetVideoMode(tvWidth, tvHeight, colorbits, flags);
|
||||
|
||||
vresWidth = tvWidth;
|
||||
vresHeight = tvHeight;
|
||||
}
|
||||
// leilei - tv mode hack end
|
||||
|
||||
// leilei - console hack
|
||||
if( r_tvConsoleMode->integer ){
|
||||
|
||||
|
||||
if (r_tvConsoleMode->integer == 1) // standard 640x448 console of 6th gen
|
||||
{
|
||||
glConfig.vidWidth = 640;
|
||||
glConfig.vidHeight = 448;
|
||||
|
||||
vresWidth = 640;
|
||||
vresHeight = 480;
|
||||
}
|
||||
|
||||
if (r_tvConsoleMode->integer == 10) // that other portable
|
||||
{
|
||||
glConfig.vidWidth = 480;
|
||||
glConfig.vidHeight = 272;
|
||||
|
||||
vresWidth = 480;
|
||||
vresHeight = 272;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
screen = vidscreen;
|
||||
|
||||
|
||||
@@ -748,6 +788,8 @@ void GLimp_Init( void )
|
||||
r_tvMode = ri.Cvar_Get( "r_tvMode", "0", CVAR_LATCH | CVAR_ARCHIVE );
|
||||
r_tvModeAspect = ri.Cvar_Get( "r_tvModeAspect", "0", CVAR_LATCH | CVAR_ARCHIVE ); // yes
|
||||
|
||||
r_tvConsoleMode = ri.Cvar_Get( "r_tvConsoleMode", "0", 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 );
|
||||
|
||||
|
Reference in New Issue
Block a user