From 49fae3c25c2ea5bf417c071182fc3da6064ab073 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Tue, 9 Jan 2018 09:09:52 +0100 Subject: [PATCH] Rename gl_clear to r_clear. --- src/client/refresh/gl/header/local.h | 2 +- src/client/refresh/gl/r_main.c | 8 ++++---- src/client/refresh/gl3/gl3_main.c | 8 ++++---- src/common/cvar.c | 3 ++- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/client/refresh/gl/header/local.h b/src/client/refresh/gl/header/local.h index 9b31c49b..25fc22a5 100644 --- a/src/client/refresh/gl/header/local.h +++ b/src/client/refresh/gl/header/local.h @@ -207,7 +207,7 @@ extern cvar_t *gl_showbbox; extern cvar_t *gl_finish; extern cvar_t *gl_ztrick; extern cvar_t *gl_zfix; -extern cvar_t *gl_clear; +extern cvar_t *r_clear; extern cvar_t *gl_cull; extern cvar_t *gl_polyblend; extern cvar_t *gl_flashblend; diff --git a/src/client/refresh/gl/r_main.c b/src/client/refresh/gl/r_main.c index 93d1332a..80871ca2 100644 --- a/src/client/refresh/gl/r_main.c +++ b/src/client/refresh/gl/r_main.c @@ -115,7 +115,7 @@ cvar_t *gl_showbbox; cvar_t *gl_ztrick; cvar_t *gl_zfix; cvar_t *gl_finish; -cvar_t *gl_clear; +cvar_t *r_clear; cvar_t *gl_cull; cvar_t *gl_polyblend; cvar_t *gl_flashblend; @@ -846,7 +846,7 @@ R_Clear(void) { static int trickframe; - if (gl_clear->value) + if (r_clear->value) { glClear(GL_COLOR_BUFFER_BIT | stencilFlags); } @@ -868,7 +868,7 @@ R_Clear(void) } else { - if (gl_clear->value) + if (r_clear->value) { glClear(GL_COLOR_BUFFER_BIT | stencilFlags | GL_DEPTH_BUFFER_BIT); } @@ -1232,7 +1232,7 @@ R_Register(void) gl_ztrick = ri.Cvar_Get("gl_ztrick", "0", 0); gl_zfix = ri.Cvar_Get("gl_zfix", "0", 0); gl_finish = ri.Cvar_Get("gl_finish", "0", CVAR_ARCHIVE); - gl_clear = ri.Cvar_Get("gl_clear", "0", 0); + r_clear = ri.Cvar_Get("r_clear", "0", 0); gl_cull = ri.Cvar_Get("gl_cull", "1", 0); gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0); gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0); diff --git a/src/client/refresh/gl3/gl3_main.c b/src/client/refresh/gl3/gl3_main.c index 147bf81d..edceffdc 100644 --- a/src/client/refresh/gl3/gl3_main.c +++ b/src/client/refresh/gl3/gl3_main.c @@ -93,7 +93,7 @@ cvar_t *vid_gamma; cvar_t *gl_anisotropic; cvar_t *gl_texturemode; cvar_t *gl_drawbuffer; -cvar_t *gl_clear; +cvar_t *r_clear; cvar_t *gl3_particle_size; cvar_t *gl3_particle_fade_factor; cvar_t *gl3_particle_square; @@ -236,7 +236,7 @@ GL3_Register(void) gl_modulate = ri.Cvar_Get("gl_modulate", "1", CVAR_ARCHIVE); gl_zfix = ri.Cvar_Get("gl_zfix", "0", 0); - gl_clear = ri.Cvar_Get("gl_clear", "0", 0); + r_clear = ri.Cvar_Get("r_clear", "0", 0); gl_cull = ri.Cvar_Get("gl_cull", "1", 0); gl_lockpvs = ri.Cvar_Get("gl_lockpvs", "0", 0); r_novis = ri.Cvar_Get("r_novis", "0", 0); @@ -281,7 +281,7 @@ GL3_Register(void) //gl_ztrick = ri.Cvar_Get("gl_ztrick", "0", 0); NOTE: dump this. //gl_zfix = ri.Cvar_Get("gl_zfix", "0", 0); //gl_finish = ri.Cvar_Get("gl_finish", "0", CVAR_ARCHIVE); - gl_clear = ri.Cvar_Get("gl_clear", "0", 0); + r_clear = ri.Cvar_Get("r_clear", "0", 0); // gl_cull = ri.Cvar_Get("gl_cull", "1", 0); gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0); //gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0); @@ -1575,7 +1575,7 @@ GL3_Clear(void) #endif // 0 - if (gl_clear->value) + if (r_clear->value) { glClear(GL_COLOR_BUFFER_BIT | stencilFlags | GL_DEPTH_BUFFER_BIT); } diff --git a/src/common/cvar.c b/src/common/cvar.c index e9541921..f1dc8917 100644 --- a/src/common/cvar.c +++ b/src/common/cvar.c @@ -45,7 +45,8 @@ replacement_t replacements[] = { {"gl_lightlevel", "r_lightlevel"}, {"gl_norefresh", "r_norefresh"}, {"gl_novis", "r_novis"}, - {"gl_speeds", "r_speeds"} + {"gl_speeds", "r_speeds"}, + {"gl_clear", "r_clear"} };