Commit: 9047717b3f51ca23735e5f291a8773053895dc36
Author: Mike Erwin
Date:   Wed Sep 21 15:47:08 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB9047717b3f51ca23735e5f291a8773053895dc36

Gawain: support triangle strips & fans in immediate mode

fixes crash in Vertex Paint (color picker)

===================================================================

M       source/blender/gpu/gawain/immediate.c

===================================================================

diff --git a/source/blender/gpu/gawain/immediate.c 
b/source/blender/gpu/gawain/immediate.c
index ec4797a..bcc84c1 100644
--- a/source/blender/gpu/gawain/immediate.c
+++ b/source/blender/gpu/gawain/immediate.c
@@ -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;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to