gl_combine cvar is no longer saved
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 14 May 2005 05:05:27 +0000 (05:05 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 14 May 2005 05:05:27 +0000 (05:05 +0000)
gl_combine cvar is no longer forced off if r_textureunits is less than 2

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5293 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c
gl_rmain.c
r_shadow.c
vid_shared.c

index e766db6..c281e91 100644 (file)
@@ -1843,7 +1843,7 @@ void SCR_UpdateScreen (void)
        if (r_textureunits.integer < 1)
                Cvar_SetValueQuick(&r_textureunits, 1);
 
-       if (gl_combine.integer && (!gl_combine_extension || r_textureunits.integer < 2))
+       if (gl_combine.integer && !gl_combine_extension)
                Cvar_SetValueQuick(&gl_combine, 0);
 
        CHECKGLERROR
index 977cec2..b5b3859 100644 (file)
@@ -1884,7 +1884,7 @@ static void R_DrawTextureSurfaceList(const entity_render_t *ent, texture_t *text
                        dofullbrightshirt = false;
                        dofullbrightpants = false;
                }
-               if (dolightmap && gl_combine.integer)
+               if (dolightmap && r_textureunits.integer >= 2 && gl_combine.integer)
                {
                        memset(&m, 0, sizeof(m));
                        m.tex[1] = R_GetTexture(basetexture);
index 9603b03..f9abefb 100644 (file)
@@ -1221,7 +1221,7 @@ void R_Shadow_Stage_Lighting(int stenciltest)
                        qglUniform1fARB(qglGetUniformLocationARB(r_shadow_lightprog, "OffsetMapping_Bias"), r_shadow_glsl_offsetmapping_bias.value);CHECKGLERROR
                }
        }
-       else if (gl_dot3arb && gl_texturecubemap && gl_combine.integer && gl_stencil)
+       else if (gl_dot3arb && gl_texturecubemap && r_textureunits.integer >= 2 && gl_combine.integer && gl_stencil)
                r_shadowstage = R_SHADOWSTAGE_LIGHT_DOT3;
        else
                r_shadowstage = R_SHADOWSTAGE_LIGHT_VERTEX;
@@ -1600,7 +1600,7 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles,
                int passes = 0;
                if (r_shadow_glsl.integer && r_shadow_program_light[0])
                        passes++; // GLSL shader path (GFFX5200, Radeon 9500)
-               else if (gl_dot3arb && gl_texturecubemap && gl_combine.integer && gl_stencil)
+               else if (gl_dot3arb && gl_texturecubemap && r_textureunits.integer >= 2 && gl_combine.integer && gl_stencil)
                {
                        // TODO: add direct pants/shirt rendering
                        if (pantstexture && (r_shadow_rtlight->ambientscale + r_shadow_rtlight->diffusescale) * VectorLength2(lightcolorpants) > 0.001)
index 31b9f93..d253881 100644 (file)
@@ -70,7 +70,7 @@ cvar_t vid_bitsperpixel = {CVAR_SAVE, "vid_bitsperpixel", "32"};
 
 cvar_t vid_vsync = {CVAR_SAVE, "vid_vsync", "0"};
 cvar_t vid_mouse = {CVAR_SAVE, "vid_mouse", "1"};
-cvar_t gl_combine = {CVAR_SAVE, "gl_combine", "1"};
+cvar_t gl_combine = {0, "gl_combine", "1"};
 cvar_t gl_finish = {0, "gl_finish", "0"};
 
 cvar_t v_gamma = {CVAR_SAVE, "v_gamma", "1"};