]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 e766db65a222ec7d5c2a09707c281e87dd767e61..c281e91f43ece991672745bb92f1846befd450ce 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 977cec284e206ffc5eb0a5b901ef49dc0b537fee..b5b3859f24dd98e1a9368a2d1ef3b1980e1f78d5 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 9603b03cfb3e114034f60fbb88491ac22ada5034..f9abefbd0d965c27cc8a6968c4330b64ce24283b 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 31b9f93798d994fd482bbbab2703fc2c57575f9b..d253881cbd4fea9f2a626a83b62cf2d335b13dd0 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"};