From: havoc Date: Sun, 6 Oct 2002 14:43:11 +0000 (+0000) Subject: GL_DrawRangeElements now reports if it got a bogus indexcount and vertex range X-Git-Tag: RELEASE_0_2_0_RC1~146 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=bd0fed04ab3877c0935c1c6dca30206ec472b231;p=xonotic%2Fdarkplaces.git GL_DrawRangeElements now reports if it got a bogus indexcount and vertex range git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2508 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_backend.c b/gl_backend.c index 48d49829..7de9f388 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -449,6 +449,11 @@ void GL_DrawRangeElements(int firstvert, int endvert, int indexcount, int *index int arraylocked = false; c_meshs++; c_meshelements += indexcount; + if (indexcount == 0 || endvert == firstvert) + { + Con_Printf("GL_DrawRangeElements(%d, %d, %d, %08p);\n", firstvert, endvert, indexcount, index); + return; + } if (gl_supportslockarrays && gl_lockarrays.integer) { qglLockArraysEXT(firstvert, endvert - firstvert);