Gawain: support triangle strips & fans in immediate mode

fixes crash in Vertex Paint (color picker)
This commit is contained in:
Mike Erwin 2016-09-21 15:47:08 +02:00
parent 0f759da370
commit 9047717b3f
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ static bool vertex_count_makes_sense_for_primitive(unsigned vertex_ct, GLenum pr
return vertex_ct > 2; // otherwise why bother?
case GL_TRIANGLES:
return vertex_ct % 3 == 0;
case GL_TRIANGLE_STRIP:
case GL_TRIANGLE_FAN:
return vertex_ct > 3; // otherwise why bother?
#ifdef WITH_GL_PROFILE_COMPAT
case GL_QUADS:
return vertex_ct % 4 == 0;