Fix T39520, show diffuse not working in dyntopo.

Was marked as a todo in the code.

This does not yet take care of correct display for multi material
meshes, since it would need correct separation of faces during pbvh
creation. Instead we just take material of first face in node and assume
that the rest faces have the same. This will create some funky effects
if one attempts to sculpt in this way.

Note: This does not yet address T39517
This commit is contained in:
2014-04-02 18:56:19 +03:00
parent 6785e45951
commit 8c730b1059
3 changed files with 35 additions and 13 deletions

View File

@@ -179,7 +179,8 @@ void GPU_update_bmesh_pbvh_buffers(GPU_PBVH_Buffers *buffers,
struct BMesh *bm,
struct GHash *bm_faces,
struct GSet *bm_unique_verts,
struct GSet *bm_other_verts);
struct GSet *bm_other_verts,
int show_diffuse_color);
void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, struct CCGElem **grids,
const struct DMFlagMat *grid_flag_mats,
@@ -189,7 +190,7 @@ void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, struct CCGElem **gr
void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial,
bool wireframe);
bool GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, bool show_diffuse_color);
bool GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, struct GHash *bm_faces, bool show_diffuse_color);
void GPU_free_pbvh_buffers(GPU_PBVH_Buffers *buffers);