Permalink
Browse files

Rename r_glCoreProfile to r_glProfile and test for "core"/"compat" st…

…rings.
  • Loading branch information...
1 parent 903dda4 commit 0a964a28f2b568b7bc93d222f2219b5162b6e905 @gimhael gimhael committed Mar 8, 2016
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
cvar_t *r_glMajorVersion;
cvar_t *r_glMinorVersion;
- cvar_t *r_glCoreProfile;
+ cvar_t *r_glProfile;
cvar_t *r_glDebugProfile;
cvar_t *r_glDebugMode;
cvar_t *r_glAllowSoftware;
@@ -1063,7 +1063,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// OpenGL context selection
r_glMajorVersion = ri.Cvar_Get( "r_glMajorVersion", "", CVAR_LATCH );
r_glMinorVersion = ri.Cvar_Get( "r_glMinorVersion", "", CVAR_LATCH );
- r_glCoreProfile = ri.Cvar_Get( "r_glCoreProfile", "", CVAR_LATCH );
+ r_glProfile = ri.Cvar_Get( "r_glProfile", "", CVAR_LATCH );
r_glDebugProfile = ri.Cvar_Get( "r_glDebugProfile", "", CVAR_LATCH );
r_glDebugMode = ri.Cvar_Get( "r_glDebugMode", "0", CVAR_CHEAT );
r_glAllowSoftware = ri.Cvar_Get( "r_glAllowSoftware", "0", CVAR_LATCH );
@@ -2796,7 +2796,7 @@ static inline void halfToFloat( const f16vec4_t in, vec4_t out )
//
extern cvar_t *r_glMajorVersion; // override GL version autodetect (for testing)
extern cvar_t *r_glMinorVersion;
- extern cvar_t *r_glCoreProfile;
+ extern cvar_t *r_glProfile;
extern cvar_t *r_glDebugProfile;
extern cvar_t *r_glDebugMode;
extern cvar_t *r_glAllowSoftware;
@@ -630,10 +630,10 @@ static rserr_t GLimp_SetMode( int mode, bool fullscreen, bool noborder )
testColorBits = (i >= 2) ? 16 : 24;
testCore = ((i & 1) == 0);
- if( testCore && r_glCoreProfile->integer == 0 )
+ if( testCore && !Q_stricmp(r_glProfile->string, "compat") )
continue;
- if( !testCore && r_glCoreProfile->integer == 1 )
+ if( !testCore && !Q_stricmp(r_glProfile->string, "core") )
continue;
if( testColorBits > colorBits )
@@ -724,7 +724,6 @@ static rserr_t GLimp_SetMode( int mode, bool fullscreen, bool noborder )
SDL_FreeSurface( icon );
- glewExperimental = GL_TRUE;
glewResult = glewInit();
if ( glewResult != GLEW_OK )

0 comments on commit 0a964a2

Please sign in to comment.