mirror of
https://github.com/ioquake/ioq3.git
synced 2025-02-23 12:01:11 +00:00
parent
49a2e1913e
commit
95060e4fb6
3 changed files with 10 additions and 0 deletions
|
@ -102,6 +102,7 @@ cvar_t *r_depthbits;
|
||||||
cvar_t *r_colorbits;
|
cvar_t *r_colorbits;
|
||||||
cvar_t *r_primitives;
|
cvar_t *r_primitives;
|
||||||
cvar_t *r_texturebits;
|
cvar_t *r_texturebits;
|
||||||
|
cvar_t *r_ext_multisample;
|
||||||
|
|
||||||
cvar_t *r_drawBuffer;
|
cvar_t *r_drawBuffer;
|
||||||
cvar_t *r_lightmap;
|
cvar_t *r_lightmap;
|
||||||
|
@ -900,6 +901,8 @@ void R_Register( void )
|
||||||
r_colorbits = ri.Cvar_Get( "r_colorbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
r_colorbits = ri.Cvar_Get( "r_colorbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
r_stencilbits = ri.Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE | CVAR_LATCH );
|
r_stencilbits = ri.Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
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_ext_multisample = ri.Cvar_Get( "r_ext_multisample", "0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
|
ri.Cvar_CheckRange( r_ext_multisample, 0, 4, qtrue );
|
||||||
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);
|
||||||
r_mode = ri.Cvar_Get( "r_mode", "3", CVAR_ARCHIVE | CVAR_LATCH );
|
r_mode = ri.Cvar_Get( "r_mode", "3", CVAR_ARCHIVE | CVAR_LATCH );
|
||||||
|
|
|
@ -1008,6 +1008,7 @@ extern cvar_t *r_stencilbits; // number of desired stencil bits
|
||||||
extern cvar_t *r_depthbits; // number of desired depth bits
|
extern cvar_t *r_depthbits; // number of desired depth bits
|
||||||
extern cvar_t *r_colorbits; // number of desired color bits, only relevant for fullscreen
|
extern cvar_t *r_colorbits; // number of desired color bits, only relevant for fullscreen
|
||||||
extern cvar_t *r_texturebits; // number of desired texture bits
|
extern cvar_t *r_texturebits; // number of desired texture bits
|
||||||
|
extern cvar_t *r_ext_multisample;
|
||||||
// 0 = use framebuffer depth
|
// 0 = use framebuffer depth
|
||||||
// 16 = use 16-bit textures
|
// 16 = use 16-bit textures
|
||||||
// 32 = use 32-bit textures
|
// 32 = use 32-bit textures
|
||||||
|
|
|
@ -208,6 +208,7 @@ static int GLimp_SetMode( int mode, qboolean fullscreen )
|
||||||
int sdlcolorbits;
|
int sdlcolorbits;
|
||||||
int colorbits, depthbits, stencilbits;
|
int colorbits, depthbits, stencilbits;
|
||||||
int tcolorbits, tdepthbits, tstencilbits;
|
int tcolorbits, tdepthbits, tstencilbits;
|
||||||
|
int samples;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
SDL_Surface *vidscreen = NULL;
|
SDL_Surface *vidscreen = NULL;
|
||||||
Uint32 flags = SDL_OPENGL;
|
Uint32 flags = SDL_OPENGL;
|
||||||
|
@ -270,6 +271,7 @@ static int GLimp_SetMode( int mode, qboolean fullscreen )
|
||||||
else
|
else
|
||||||
depthbits = r_depthbits->value;
|
depthbits = r_depthbits->value;
|
||||||
stencilbits = r_stencilbits->value;
|
stencilbits = r_stencilbits->value;
|
||||||
|
samples = r_ext_multisample->value;
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
|
@ -337,6 +339,9 @@ static int GLimp_SetMode( int mode, qboolean fullscreen )
|
||||||
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits );
|
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits );
|
||||||
SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits );
|
SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits );
|
||||||
|
|
||||||
|
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, samples ? 1 : 0 );
|
||||||
|
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, samples );
|
||||||
|
|
||||||
if(r_stereoEnabled->integer)
|
if(r_stereoEnabled->integer)
|
||||||
{
|
{
|
||||||
glConfig.stereoEnabled = qtrue;
|
glConfig.stereoEnabled = qtrue;
|
||||||
|
@ -674,6 +679,7 @@ void GLimp_Init( void )
|
||||||
{
|
{
|
||||||
ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d\n",
|
ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d\n",
|
||||||
r_mode->integer, R_MODE_FALLBACK );
|
r_mode->integer, R_MODE_FALLBACK );
|
||||||
|
ri.Cvar_Set("r_ext_multisample", "0");
|
||||||
if( !GLimp_StartDriverAndSetMode( R_MODE_FALLBACK, r_fullscreen->integer ) )
|
if( !GLimp_StartDriverAndSetMode( R_MODE_FALLBACK, r_fullscreen->integer ) )
|
||||||
success = qfalse;
|
success = qfalse;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue