ref: gl: fix r_shadows and gl_vbo registration order. It must be registered before reading renderer config
This commit is contained in:
parent
422addcbb6
commit
eb72b6baee
4 changed files with 16 additions and 16 deletions
|
@ -21,8 +21,6 @@ GNU General Public License for more details.
|
||||||
#include "pm_local.h"
|
#include "pm_local.h"
|
||||||
#include "pmtrace.h"
|
#include "pmtrace.h"
|
||||||
|
|
||||||
extern cvar_t r_shadows;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
double time;
|
double time;
|
||||||
|
|
|
@ -767,6 +767,7 @@ extern convar_t r_vbo_detail;
|
||||||
extern convar_t r_vbo_overbrightmode;
|
extern convar_t r_vbo_overbrightmode;
|
||||||
extern convar_t r_studio_sort_textures;
|
extern convar_t r_studio_sort_textures;
|
||||||
extern convar_t r_studio_drawelements;
|
extern convar_t r_studio_drawelements;
|
||||||
|
extern convar_t r_shadows;
|
||||||
extern convar_t r_ripple;
|
extern convar_t r_ripple;
|
||||||
extern convar_t r_ripple_updatetime;
|
extern convar_t r_ripple_updatetime;
|
||||||
extern convar_t r_ripple_spawntime;
|
extern convar_t r_ripple_spawntime;
|
||||||
|
|
|
@ -1146,10 +1146,6 @@ void GL_InitExtensions( void )
|
||||||
gEngfuncs.Cvar_SetValue( "gl_finish", 1 );
|
gEngfuncs.Cvar_SetValue( "gl_finish", 1 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// we do not want to write vbo code that does not use multitexture
|
|
||||||
if( !GL_Support( GL_ARB_VERTEX_BUFFER_OBJECT_EXT ) || !GL_Support( GL_ARB_MULTITEXTURE ) || glConfig.max_texture_units < 2 )
|
|
||||||
gEngfuncs.Cvar_FullSet( "gl_vbo", "0", FCVAR_READ_ONLY );
|
|
||||||
|
|
||||||
R_RenderInfo_f();
|
R_RenderInfo_f();
|
||||||
|
|
||||||
tr.framecount = tr.visframecount = 1;
|
tr.framecount = tr.visframecount = 1;
|
||||||
|
@ -1191,6 +1187,11 @@ static void GL_InitCommands( void )
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_ripple );
|
gEngfuncs.Cvar_RegisterVariable( &r_ripple );
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_ripple_updatetime );
|
gEngfuncs.Cvar_RegisterVariable( &r_ripple_updatetime );
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_ripple_spawntime );
|
gEngfuncs.Cvar_RegisterVariable( &r_ripple_spawntime );
|
||||||
|
gEngfuncs.Cvar_RegisterVariable( &r_shadows );
|
||||||
|
gEngfuncs.Cvar_RegisterVariable( &r_vbo );
|
||||||
|
gEngfuncs.Cvar_RegisterVariable( &r_vbo_dlightmode );
|
||||||
|
gEngfuncs.Cvar_RegisterVariable( &r_vbo_overbrightmode );
|
||||||
|
gEngfuncs.Cvar_RegisterVariable( &r_vbo_detail );
|
||||||
|
|
||||||
gEngfuncs.Cvar_RegisterVariable( &gl_extensions );
|
gEngfuncs.Cvar_RegisterVariable( &gl_extensions );
|
||||||
gEngfuncs.Cvar_RegisterVariable( &gl_texture_nearest );
|
gEngfuncs.Cvar_RegisterVariable( &gl_texture_nearest );
|
||||||
|
@ -1228,6 +1229,7 @@ register VBO cvars and get default value
|
||||||
static void R_CheckVBO( void )
|
static void R_CheckVBO( void )
|
||||||
{
|
{
|
||||||
qboolean disable = false;
|
qboolean disable = false;
|
||||||
|
int flags = 0;
|
||||||
|
|
||||||
// some bad GLES1 implementations breaks dlights completely
|
// some bad GLES1 implementations breaks dlights completely
|
||||||
if( glConfig.max_texture_units < 3 )
|
if( glConfig.max_texture_units < 3 )
|
||||||
|
@ -1240,17 +1242,18 @@ static void R_CheckVBO( void )
|
||||||
disable = true;
|
disable = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( disable )
|
// we do not want to write vbo code that does not use multitexture
|
||||||
|
if( !GL_Support( GL_ARB_VERTEX_BUFFER_OBJECT_EXT ) || !GL_Support( GL_ARB_MULTITEXTURE ) || glConfig.max_texture_units < 2 )
|
||||||
{
|
{
|
||||||
r_vbo.flags = r_vbo_dlightmode.flags = 0;
|
flags = FCVAR_READ_ONLY;
|
||||||
r_vbo.string = "0";
|
disable = true;
|
||||||
r_vbo_dlightmode.string = "0";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_vbo );
|
if( disable )
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_vbo_dlightmode );
|
{
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_vbo_overbrightmode );
|
gEngfuncs.Cvar_FullSet( r_vbo.name, "0", flags );
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_vbo_detail );
|
gEngfuncs.Cvar_FullSet( r_vbo_dlightmode.name, "0", flags );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -154,8 +154,6 @@ void R_StudioInit( void )
|
||||||
|
|
||||||
Matrix3x4_LoadIdentity( g_studio.rotationmatrix );
|
Matrix3x4_LoadIdentity( g_studio.rotationmatrix );
|
||||||
|
|
||||||
gEngfuncs.Cvar_RegisterVariable( &r_shadows );
|
|
||||||
|
|
||||||
g_studio.interpolate = true;
|
g_studio.interpolate = true;
|
||||||
g_studio.framecount = 0;
|
g_studio.framecount = 0;
|
||||||
m_fDoRemap = false;
|
m_fDoRemap = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue