From dfd1c391f1e669db38ae21e776707c0ec791b7e2 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 9 May 2010 00:13:51 +0000 Subject: [PATCH] fix a stencil shadowvolume bug with models that use dynamic batches git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10177 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rsurf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gl_rsurf.c b/gl_rsurf.c index 374d8587..4316c338 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1084,10 +1084,9 @@ void R_Q1BSP_DrawShadowVolume(entity_render_t *ent, const vec3_t relativelightor rsurface.texture = R_GetCurrentTexture(surface->texture); if (rsurface.texture->currentmaterialflags & MATERIALFLAG_NOSHADOW) continue; - RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX, 1, &surface); - R_Shadow_MarkVolumeFromBox(surface->num_firsttriangle, surface->num_triangles, rsurface.batchvertex3f, rsurface.modelelement3i, relativelightorigin, relativelightdirection, lightmins, lightmaxs, surface->mins, surface->maxs); + R_Shadow_MarkVolumeFromBox(surface->num_firsttriangle, surface->num_triangles, rsurface.modelvertex3f, rsurface.modelelement3i, relativelightorigin, relativelightdirection, lightmins, lightmaxs, surface->mins, surface->maxs); } - R_Shadow_VolumeFromList(model->surfmesh.num_vertices, model->surfmesh.num_triangles, rsurface.batchvertex3f, model->surfmesh.data_element3i, model->surfmesh.data_neighbor3i, relativelightorigin, relativelightdirection, projectdistance, numshadowmark, shadowmarklist, ent->mins, ent->maxs); + R_Shadow_VolumeFromList(model->surfmesh.num_vertices, model->surfmesh.num_triangles, rsurface.modelvertex3f, model->surfmesh.data_element3i, model->surfmesh.data_neighbor3i, relativelightorigin, relativelightdirection, projectdistance, numshadowmark, shadowmarklist, ent->mins, ent->maxs); } if (ent->model->brush.submodel) GL_PolygonOffset(r_refdef.shadowpolygonfactor, r_refdef.shadowpolygonoffset); -- 2.39.2