Fix #36356: faces not drawn with constructive modifier + dynamic paint, where it

overrides material colors with dynamic paint colors.
This commit is contained in:
Brecht Van Lommel
2013-09-09 20:46:43 +00:00
parent 259ddc4cf8
commit 1bbc432ead

View File

@@ -2552,6 +2552,11 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
}
}
static int draw_dm_override_material_color(int UNUSED(nr), void *UNUSED(attribs))
{
return 1;
}
/* Second section of routines: Combine first sets to form fancy
* drawing routines (for example rendering twice to get overlays).
*
@@ -3468,7 +3473,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL, DM_DRAW_USE_COLORS);
dm->drawMappedFaces(dm, NULL, draw_dm_override_material_color, NULL, NULL, DM_DRAW_USE_COLORS);
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_LIGHTING);