From: havoc Date: Thu, 6 Jan 2005 13:31:31 +0000 (+0000) Subject: swapped order of incr/decr renders for static shadow volumes (for some reason I had... X-Git-Tag: xonotic-v0.1.0preview~5244 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d50c79d93c3cd0e86112c7cdeb417cfa61fa83fb;p=xonotic%2Fdarkplaces.git swapped order of incr/decr renders for static shadow volumes (for some reason I had decr first, then incr, doesn't matter since they don't clamp but looks odd in the code) remove quotes on cubemap names in .rtlights file loader (forgot to commit this previously) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4899 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index c447789a..780159ed 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2422,15 +2422,15 @@ void R_DrawRTLight(rtlight_t *rtlight, int visiblevolumes) GL_LockArrays(0, mesh->numverts); if (r_shadowstage == SHADOWSTAGE_STENCIL) { - // decrement stencil if frontface is behind depthbuffer - qglCullFace(GL_FRONT); // quake is backwards, this culls back faces - qglStencilOp(GL_KEEP, GL_DECR, GL_KEEP); - R_Mesh_Draw(mesh->numverts, mesh->numtriangles, mesh->element3i); - c_rtcached_shadowmeshes++; - c_rtcached_shadowtris += mesh->numtriangles; // increment stencil if backface is behind depthbuffer qglCullFace(GL_BACK); // quake is backwards, this culls front faces qglStencilOp(GL_KEEP, GL_INCR, GL_KEEP); + R_Mesh_Draw(mesh->numverts, mesh->numtriangles, mesh->element3i); + c_rtcached_shadowmeshes++; + c_rtcached_shadowtris += mesh->numtriangles; + // decrement stencil if frontface is behind depthbuffer + qglCullFace(GL_FRONT); // quake is backwards, this culls back faces + qglStencilOp(GL_KEEP, GL_DECR, GL_KEEP); } R_Mesh_Draw(mesh->numverts, mesh->numtriangles, mesh->element3i); c_rtcached_shadowmeshes++; @@ -2872,6 +2872,12 @@ void R_Shadow_LoadWorldLights(void) corona = 0; if (a < 9 || !strcmp(cubemapname, "\"\"")) cubemapname[0] = 0; + // remove quotes on cubemapname + if (cubemapname[0] == '"' && cubemapname[strlen(cubemapname) - 1] == '"') + { + cubemapname[strlen(cubemapname)-1] = 0; + strcpy(cubemapname, cubemapname + 1); + } *s = '\n'; if (a < 8) {