diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-08-24 17:46:42 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-08-24 17:46:59 +0300 |
commit | 0ba3a1a6863a4b5960933df7d5a12d158da5d0d0 (patch) | |
tree | 63658c12166b668d2de3d58882ea0dd8e07c4e96 /source/blender/gpu/GPU_buffers.h | |
parent | c899f21800533f0d188c505e3909a3e1f2a0c7f2 (diff) |
Sculpt: Optimize Mask Overlay drawing
* Remove support for diffuse color in the pbvh buffers.
* Upload raw data to GPU.
* Only draw nodes that have mask data when drawing the overlay.
This should fix T56466
Diffstat (limited to 'source/blender/gpu/GPU_buffers.h')
-rw-r--r-- | source/blender/gpu/GPU_buffers.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 77801256463..e60b5d60c30 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -66,7 +66,6 @@ GPU_PBVH_Buffers *GPU_pbvh_bmesh_buffers_build(bool smooth_shading); /* update */ enum { - GPU_PBVH_BUFFERS_SHOW_DIFFUSE_COLOR = (1 << 0), GPU_PBVH_BUFFERS_SHOW_MASK = (1 << 1), }; @@ -93,12 +92,11 @@ void GPU_pbvh_grid_buffers_update( /* draw */ struct GPUBatch *GPU_pbvh_buffers_batch_get(GPU_PBVH_Buffers *buffers, bool fast); +bool GPU_pbvh_buffers_has_mask(GPU_PBVH_Buffers *buffers); + /* debug PBVH draw */ void GPU_pbvh_BB_draw(float min[3], float max[3], bool leaf, unsigned int pos); -bool GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, struct GSet *bm_faces, bool show_diffuse_color); -bool GPU_pbvh_buffers_mask_changed(GPU_PBVH_Buffers *buffers, bool show_mask); - void GPU_pbvh_buffers_free(GPU_PBVH_Buffers *buffers); void GPU_pbvh_multires_buffers_free(struct GridCommonGPUBuffer **grid_common_gpu_buffer); |