From c9a6f2be8ed63432cc010bf59ba9f109b1202634 Mon Sep 17 00:00:00 2001 From: eihrul Date: Tue, 18 Oct 2011 07:14:43 +0000 Subject: [PATCH] fix fbo var name bug in R_DrawModelShadowMaps git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11443 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r_shadow.c b/r_shadow.c index f48621e5..521f6984 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -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); -- 2.39.2