]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix fbo var name bug in R_DrawModelShadowMaps
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 Oct 2011 07:14:43 +0000 (07:14 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 18 Oct 2011 07:14:43 +0000 (07:14 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11443 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index f48621e52d1cc7a707729f48c4a7a8640f6cb3cc..521f6984d4088b256227cbb59ce6d172c6390ad1 100644 (file)
@@ -4783,7 +4783,7 @@ void R_DrawModelShadowMaps(int fbo, rtexture_t *depthtexture, rtexture_t *colort
        float m[12];
        matrix4x4_t shadowmatrix, cameramatrix, mvpmatrix, invmvpmatrix, scalematrix, texmatrix;
        r_viewport_t viewport;
-       GLuint fbo2d = 0;
+       GLuint shadowfbo = 0;
        float clearcolor[4];
 
        if (!r_refdef.scene.numentities)
@@ -4810,7 +4810,7 @@ void R_DrawModelShadowMaps(int fbo, rtexture_t *depthtexture, rtexture_t *colort
        case R_SHADOW_SHADOWMODE_SHADOWMAP2D:
                if (!r_shadow_shadowmap2dtexture)
                        R_Shadow_MakeShadowMap(0, r_shadow_shadowmapmaxsize);
-               fbo = r_shadow_fbo2d;
+               shadowfbo = r_shadow_fbo2d;
                r_shadow_shadowmap_texturescale[0] = 1.0f / R_TextureWidth(r_shadow_shadowmap2dtexture);
                r_shadow_shadowmap_texturescale[1] = 1.0f / R_TextureHeight(r_shadow_shadowmap2dtexture);
                r_shadow_rendermode = R_SHADOW_RENDERMODE_SHADOWMAP2D;
@@ -4860,7 +4860,7 @@ void R_DrawModelShadowMaps(int fbo, rtexture_t *depthtexture, rtexture_t *colort
 
        VectorMA(shadoworigin, (1.0f - fabs(dot1)) * radius, shadowforward, shadoworigin);
 
-       R_Mesh_SetRenderTargets(fbo2d, r_shadow_shadowmap2dtexture, r_shadow_shadowmap2dcolortexture, NULL, NULL, NULL);
+       R_Mesh_SetRenderTargets(shadowfbo, r_shadow_shadowmap2dtexture, r_shadow_shadowmap2dcolortexture, NULL, NULL, NULL);
        R_SetupShader_DepthOrShadow(true);
        GL_PolygonOffset(r_shadow_shadowmapping_polygonfactor.value, r_shadow_shadowmapping_polygonoffset.value);
        GL_DepthMask(true);