From: havoc havoc@d7cf8633-e32d-0410-b094-e92efae38249 <> Date: Sun, 9 May 2010 00:13:51 +0000 (+0000) Subject: UNMERGE X-Git-Tag: xonotic-v0.1.0preview~170 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=611b2c7db39cb63b75c04ea58746df86d9ddbb26;p=xonotic%2Fdarkplaces.git UNMERGE 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 ::stable-branch::unmerge=dfd1c391f1e669db38ae21e776707c0ec791b7e2 --- diff --git a/gl_rsurf.c b/gl_rsurf.c index bd084c16..615119ba 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1084,9 +1084,10 @@ 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; - R_Shadow_MarkVolumeFromBox(surface->num_firsttriangle, surface->num_triangles, rsurface.modelvertex3f, rsurface.modelelement3i, relativelightorigin, relativelightdirection, lightmins, lightmaxs, surface->mins, surface->maxs); + 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_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); + 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); } if (ent->model->brush.submodel) GL_PolygonOffset(r_refdef.shadowpolygonfactor, r_refdef.shadowpolygonoffset);