[Bf-blender-cvs] [4627516] master: Fix T37663: Black matcap when object located on a curve

Sergey Sharybin noreply at git.blender.org
Tue Dec 3 17:14:21 CET 2013


Commit: 462751688449108899a821f500cffc03658d6e3d
Author: Sergey Sharybin
Date:   Tue Dec 3 22:14:16 2013 +0600
http://developer.blender.org/rB462751688449108899a821f500cffc03658d6e3d

Fix T37663: Black matcap when object located on a curve

Summary:
Issue was caused by GLSL samplers not valid anymore after
dupliobject was drawn into OpenGL displist.

Solution for now is to not use displist for active object
when matcap is used.

The same issue exists for regular GLSL viewport draw, and
this was solved by disabling diplist if draw_glsl_material
returns truth for current dupliobject.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T37663

Differential Revision: http://developer.blender.org/D70

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

M	source/blender/editors/space_view3d/view3d_draw.c

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

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 3d26037..1932976 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2019,7 +2019,9 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
 			    /* lamp drawing messes with matrices, could be handled smarter... but this works */
 			    (dob->ob->type == OB_LAMP) ||
 			    (dob->type == OB_DUPLIGROUP && dob->animated) ||
-			    !(bb_tmp = BKE_object_boundbox_get(dob->ob)))
+			    !(bb_tmp = BKE_object_boundbox_get(dob->ob)) ||
+			    draw_glsl_material(scene, dob->ob, v3d, dt) ||
+			    (base->object == OBACT && v3d->flag2 & V3D_SOLID_MATCAP))
 			{
 				// printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name + 2);
 				use_displist = false;




More information about the Bf-blender-cvs mailing list