mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Remove gl_cull cvar. Was enabled regardless of the setting of the cvar, in any case.
This commit is contained in:
parent
d9b509b885
commit
62eefb49af
4 changed files with 21 additions and 21 deletions
|
@ -968,9 +968,9 @@ MYgluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
|
|||
static void
|
||||
R_SetupGL (void)
|
||||
{
|
||||
float screenaspect;
|
||||
extern int glwidth, glheight;
|
||||
int x, x2, y2, y, w, h;
|
||||
float screenaspect;
|
||||
extern int glwidth, glheight;
|
||||
int x, x2, y2, y, w, h;
|
||||
|
||||
// set up viewpoint
|
||||
glMatrixMode (GL_PROJECTION);
|
||||
|
@ -978,9 +978,8 @@ R_SetupGL (void)
|
|||
x = r_refdef.vrect.x * glwidth / vid.width;
|
||||
x2 = (r_refdef.vrect.x + r_refdef.vrect.width) * glwidth / vid.width;
|
||||
y = (vid.height - r_refdef.vrect.y) * glheight / vid.height;
|
||||
y2 =
|
||||
(vid.height -
|
||||
(r_refdef.vrect.y + r_refdef.vrect.height)) * glheight / vid.height;
|
||||
y2 = (vid.height - (r_refdef.vrect.y + r_refdef.vrect.height)) * glheight
|
||||
/ vid.height;
|
||||
|
||||
// fudge around because of frac screen scale
|
||||
if (x > 0)
|
||||
|
@ -1027,11 +1026,6 @@ R_SetupGL (void)
|
|||
glGetFloatv (GL_MODELVIEW_MATRIX, r_world_matrix);
|
||||
|
||||
// set drawing parms
|
||||
if (gl_cull->int_val)
|
||||
glEnable (GL_CULL_FACE);
|
||||
else
|
||||
glDisable (GL_CULL_FACE);
|
||||
|
||||
glEnable (GL_CULL_FACE);
|
||||
glDisable (GL_ALPHA_TEST);
|
||||
glAlphaFunc (GL_GREATER, 0.5);
|
||||
|
@ -1057,6 +1051,7 @@ R_Clear (void)
|
|||
glDepthRange (gldepthmin, gldepthmax);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
R_RenderScene (void)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,6 @@ cvar_t *gl_clear;
|
|||
cvar_t *gl_conalpha;
|
||||
cvar_t *gl_conspin;
|
||||
cvar_t *gl_constretch;
|
||||
cvar_t *gl_cull; // FIXME
|
||||
cvar_t *gl_dlight_lightmap;
|
||||
cvar_t *gl_dlight_polyblend;
|
||||
cvar_t *gl_dlight_smooth;
|
||||
|
@ -129,7 +128,6 @@ R_Init_Cvars (void)
|
|||
"speed at which the console spins");
|
||||
gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE, NULL,
|
||||
"toggle console between slide and stretch");
|
||||
gl_cull = Cvar_Get ("gl_cull", "1", CVAR_NONE, NULL, "None");
|
||||
gl_dlight_lightmap = Cvar_Get ("gl_dlight_lightmap", "1", CVAR_ARCHIVE,
|
||||
NULL, "Set to 1 for high quality dynamic "
|
||||
"lighting.");
|
||||
|
|
|
@ -981,9 +981,9 @@ MYgluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
|
|||
static void
|
||||
R_SetupGL (void)
|
||||
{
|
||||
float screenaspect;
|
||||
extern int glwidth, glheight;
|
||||
int x, x2, y2, y, w, h;
|
||||
float screenaspect;
|
||||
extern int glwidth, glheight;
|
||||
int x, x2, y2, y, w, h;
|
||||
|
||||
// set up viewpoint
|
||||
glMatrixMode (GL_PROJECTION);
|
||||
|
@ -991,9 +991,8 @@ R_SetupGL (void)
|
|||
x = r_refdef.vrect.x * glwidth / vid.width;
|
||||
x2 = (r_refdef.vrect.x + r_refdef.vrect.width) * glwidth / vid.width;
|
||||
y = (vid.height - r_refdef.vrect.y) * glheight / vid.height;
|
||||
y2 =
|
||||
(vid.height -
|
||||
(r_refdef.vrect.y + r_refdef.vrect.height)) * glheight / vid.height;
|
||||
y2 = (vid.height - (r_refdef.vrect.y + r_refdef.vrect.height)) * glheight
|
||||
/ vid.height;
|
||||
|
||||
// fudge around because of frac screen scale
|
||||
if (x > 0)
|
||||
|
@ -1017,6 +1016,15 @@ R_SetupGL (void)
|
|||
screenaspect = (float) r_refdef.vrect.width / r_refdef.vrect.height;
|
||||
MYgluPerspective (r_refdef.fov_y, screenaspect, 4, 4096);
|
||||
|
||||
if (mirror) {
|
||||
if (mirror_plane->normal[2])
|
||||
glScalef (1, -1, 1);
|
||||
else
|
||||
glScalef (-1, 1, 1);
|
||||
glCullFace (GL_BACK);
|
||||
} else
|
||||
glCullFace (GL_FRONT);
|
||||
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
glLoadIdentity ();
|
||||
|
||||
|
@ -1056,6 +1064,7 @@ R_Clear (void)
|
|||
glDepthRange (gldepthmin, gldepthmax);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
R_RenderScene (void)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,6 @@ cvar_t *gl_clear;
|
|||
cvar_t *gl_conalpha;
|
||||
cvar_t *gl_conspin;
|
||||
cvar_t *gl_constretch;
|
||||
cvar_t *gl_cull; // FIXME
|
||||
cvar_t *gl_dlight_lightmap;
|
||||
cvar_t *gl_dlight_polyblend;
|
||||
cvar_t *gl_dlight_smooth;
|
||||
|
@ -129,7 +128,6 @@ R_Init_Cvars (void)
|
|||
"speed at which the console spins");
|
||||
gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE, NULL,
|
||||
"toggle console between slide and stretch");
|
||||
gl_cull = Cvar_Get ("gl_cull", "1", CVAR_NONE, NULL, "None");
|
||||
gl_dlight_lightmap = Cvar_Get ("gl_dlight_lightmap", "1", CVAR_ARCHIVE,
|
||||
NULL, "Set to 1 for high quality dynamic "
|
||||
"lighting.");
|
||||
|
|
Loading…
Reference in a new issue