Navigation Menu

Skip to content

Commit

Permalink
Rename r_glCoreProfile to r_glProfile and test for "core"/"compat" st…
Browse files Browse the repository at this point in the history
…rings.
  • Loading branch information
gimhael committed Mar 8, 2016
1 parent 903dda4 commit 0a964a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions daemon/src/engine/renderer/tr_init.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/engine/renderer/tr_local.h
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions daemon/src/engine/sys/sdl_glimp.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit 0a964a2

Please sign in to comment.