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
This commit is contained in:
Sergey Sharybin 2013-12-03 22:14:16 +06:00
parent d3f3fb89cc
commit 4627516884
Notes: blender-bot 2023-02-14 11:32:15 +01:00
Referenced by issue #37663, Black matcap when object located on a curve
1 changed files with 3 additions and 1 deletions

View File

@ -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;