Rename gl_particle* to gl1_particle*.

This commit is contained in:
Yamagi Burmeister 2018-01-09 14:26:11 +01:00
parent 4061e85cd7
commit 171e592693
5 changed files with 37 additions and 31 deletions

View file

@ -180,12 +180,12 @@ extern cvar_t *gl1_overbrightbits;
extern cvar_t *gl1_palettedtexture;
extern cvar_t *gl_pointparameters;
extern cvar_t *gl_particle_min_size;
extern cvar_t *gl_particle_max_size;
extern cvar_t *gl_particle_size;
extern cvar_t *gl_particle_att_a;
extern cvar_t *gl_particle_att_b;
extern cvar_t *gl_particle_att_c;
extern cvar_t *gl1_particle_min_size;
extern cvar_t *gl1_particle_max_size;
extern cvar_t *gl1_particle_size;
extern cvar_t *gl1_particle_att_a;
extern cvar_t *gl1_particle_att_b;
extern cvar_t *gl1_particle_att_c;
extern cvar_t *r_mode;
extern cvar_t *r_customwidth;

View file

@ -82,12 +82,12 @@ cvar_t *r_farsee;
cvar_t *r_lightlevel;
cvar_t *gl1_overbrightbits;
cvar_t *gl_particle_min_size;
cvar_t *gl_particle_max_size;
cvar_t *gl_particle_size;
cvar_t *gl_particle_att_a;
cvar_t *gl_particle_att_b;
cvar_t *gl_particle_att_c;
cvar_t *gl1_particle_min_size;
cvar_t *gl1_particle_max_size;
cvar_t *gl1_particle_size;
cvar_t *gl1_particle_att_a;
cvar_t *gl1_particle_att_b;
cvar_t *gl1_particle_att_c;
cvar_t *gl1_palettedtexture;
cvar_t *gl_pointparameters;
@ -534,7 +534,7 @@ R_DrawParticles(void)
glDisable(GL_TEXTURE_2D);
// assume the particle size looks good with window height 480px and scale according to real resolution
glPointSize(gl_particle_size->value * (float)r_newrefdef.height/480.0f);
glPointSize(gl1_particle_size->value * (float)r_newrefdef.height/480.0f);
for ( i = 0, p = r_newrefdef.particles; i < r_newrefdef.num_particles; i++, p++ )
{
@ -1211,12 +1211,12 @@ R_Register(void)
r_lightlevel = ri.Cvar_Get("r_lightlevel", "0", 0);
gl1_overbrightbits = ri.Cvar_Get("gl1_overbrightbits", "0", CVAR_ARCHIVE);
gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", CVAR_ARCHIVE);
gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", CVAR_ARCHIVE);
gl_particle_size = ri.Cvar_Get("gl_particle_size", "40", CVAR_ARCHIVE);
gl_particle_att_a = ri.Cvar_Get("gl_particle_att_a", "0.01", CVAR_ARCHIVE);
gl_particle_att_b = ri.Cvar_Get("gl_particle_att_b", "0.0", CVAR_ARCHIVE);
gl_particle_att_c = ri.Cvar_Get("gl_particle_att_c", "0.01", CVAR_ARCHIVE);
gl1_particle_min_size = ri.Cvar_Get("gl1_particle_min_size", "2", CVAR_ARCHIVE);
gl1_particle_max_size = ri.Cvar_Get("gl1_particle_max_size", "40", CVAR_ARCHIVE);
gl1_particle_size = ri.Cvar_Get("gl1_particle_size", "40", CVAR_ARCHIVE);
gl1_particle_att_a = ri.Cvar_Get("gl1_particle_att_a", "0.01", CVAR_ARCHIVE);
gl1_particle_att_b = ri.Cvar_Get("gl1_particle_att_b", "0.0", CVAR_ARCHIVE);
gl1_particle_att_c = ri.Cvar_Get("gl1_particle_att_c", "0.01", CVAR_ARCHIVE);
r_modulate = ri.Cvar_Get("r_modulate", "1", CVAR_ARCHIVE);
r_mode = ri.Cvar_Get("r_mode", "4", CVAR_ARCHIVE);

View file

@ -185,17 +185,17 @@ R_SetDefaultState(void)
{
float attenuations[3];
attenuations[0] = gl_particle_att_a->value;
attenuations[1] = gl_particle_att_b->value;
attenuations[2] = gl_particle_att_c->value;
attenuations[0] = gl1_particle_att_a->value;
attenuations[1] = gl1_particle_att_b->value;
attenuations[2] = gl1_particle_att_c->value;
/* GL_POINT_SMOOTH is not implemented by some OpenGL
drivers, especially the crappy Mesa3D backends like
i915.so. That the points are squares and not circles
is not a problem by Quake II! */
glEnable(GL_POINT_SMOOTH);
qglPointParameterfARB(GL_POINT_SIZE_MIN_EXT, gl_particle_min_size->value);
qglPointParameterfARB(GL_POINT_SIZE_MAX_EXT, gl_particle_max_size->value);
qglPointParameterfARB(GL_POINT_SIZE_MIN_EXT, gl1_particle_min_size->value);
qglPointParameterfARB(GL_POINT_SIZE_MAX_EXT, gl1_particle_max_size->value);
qglPointParameterfvARB(GL_DISTANCE_ATTENUATION_EXT, attenuations);
}

View file

@ -255,12 +255,12 @@ GL3_Register(void)
//r_lightlevel = ri.Cvar_Get("r_lightlevel", "0", 0);
//gl_overbrightbits = ri.Cvar_Get("gl_overbrightbits", "0", CVAR_ARCHIVE);
gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", CVAR_ARCHIVE);
gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", CVAR_ARCHIVE);
//gl_particle_size = ri.Cvar_Get("gl_particle_size", "40", CVAR_ARCHIVE);
gl_particle_att_a = ri.Cvar_Get("gl_particle_att_a", "0.01", CVAR_ARCHIVE);
gl_particle_att_b = ri.Cvar_Get("gl_particle_att_b", "0.0", CVAR_ARCHIVE);
gl_particle_att_c = ri.Cvar_Get("gl_particle_att_c", "0.01", CVAR_ARCHIVE);
gl1_particle_min_size = ri.Cvar_Get("gl1_particle_min_size", "2", CVAR_ARCHIVE);
gl1_particle_max_size = ri.Cvar_Get("gl1_particle_max_size", "40", CVAR_ARCHIVE);
//gl1_particle_size = ri.Cvar_Get("gl1_particle_size", "40", CVAR_ARCHIVE);
gl1_particle_att_a = ri.Cvar_Get("gl1_particle_att_a", "0.01", CVAR_ARCHIVE);
gl1_particle_att_b = ri.Cvar_Get("gl1_particle_att_b", "0.0", CVAR_ARCHIVE);
gl1_particle_att_c = ri.Cvar_Get("gl1_particle_att_c", "0.01", CVAR_ARCHIVE);
//gl_modulate = ri.Cvar_Get("gl_modulate", "1", CVAR_ARCHIVE);
//r_mode = ri.Cvar_Get("r_mode", "4", CVAR_ARCHIVE);

View file

@ -60,7 +60,13 @@ replacement_t replacements[] = {
{"gl_mode", "r_mode"},
{"gl_modulate", "r_modulate"},
{"gl_overbrightbits", "gl1_overbrightbits"},
{"gl_palettedtextures", "gl1_palettedtextures"}
{"gl_palettedtextures", "gl1_palettedtextures"},
{"gl_particle_min_size", "gl1_particle_min_size"},
{"gl_particle_max_size", "gl1_particle_max_size"},
{"gl_particle_size", "gl1_particle_size"},
{"gl_particle_att_a", "gl1_particle_att_a"},
{"gl_particle_att_b", "gl1_particle_att_b"},
{"gl_particle_att_c", "gl1_particle_att_c"}
};