From ee701baff8caf6d184fa245e170c1e67981e2608 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 16 Apr 2019 14:00:16 +0200 Subject: Workbench: Support Active Vertex Color Currently it is not possible to view the vertex colors of an object. To optimize the workflow, workbench will need to support Vertex Colors. The Vertex Colors is a new option in `shading->color_type`. When objects do not have vertex color, the objects will be rendered with the `V3D_SHADING_OBJECT_COLOR`. In order to support vertex colors in workbench the current texture/solid shading structure is migrated to a primary shaders and fallback shaders. Fix: T57000 Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D4694 --- source/blender/gpu/GPU_buffers.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/gpu/GPU_buffers.h') diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 895887c2588..20047174bb1 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -35,6 +35,7 @@ struct MLoop; struct MLoopTri; struct MPoly; struct MVert; +struct MLoopCol; struct PBVH; /* Buffers for drawing from PBVH grids. */ @@ -57,6 +58,7 @@ GPU_PBVH_Buffers *GPU_pbvh_bmesh_buffers_build(bool smooth_shading); enum { GPU_PBVH_BUFFERS_SHOW_MASK = (1 << 1), + GPU_PBVH_BUFFERS_SHOW_VCOL = (1 << 1), }; void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers, @@ -64,6 +66,7 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers, const int *vert_indices, int totvert, const float *vmask, + const struct MLoopCol *vcol, const int (*face_vert_indices)[3], const int update_flags); -- cgit v1.2.3