git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10594
d7cf8633-e32d-0410-b094-
e92efae38249
void RSurf_DrawBatch(void)
{
+ // sometimes a zero triangle surface (usually a degenerate patch) makes it
+ // through the pipeline, killing it earlier in the pipeline would have
+ // per-surface overhead rather than per-batch overhead, so it's best to
+ // reject it here, before it hits glDraw.
+ if (rsurface.batchnumtriangles == 0)
+ return;
#if 0
// batch debugging code
if (r_test.integer && rsurface.entity == r_refdef.scene.worldentity && rsurface.batchvertex3f == r_refdef.scene.worldentity->model->surfmesh.data_vertex3f)