Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-06-08 22:30:01 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-06-08 22:30:01 +0300
commit285a68b7bbf2fa40e41d507991467387f5dd5264 (patch)
tree0d1f4ea92f6d7e9eb512d85e541905bc198800f6 /source/blender/draw/intern/draw_cache_impl_mesh.cc
parent9c28f0eb37aebd6e5eae0763b008ef02d5ce081b (diff)
Sculpt: PBVH Draw Support for EEVEE
This patch adds support for PBVH drawing in EEVEE. Notes: # PBVH_FACES only. For Multires we'll need an API to get/cache attributes. DynTopo support will be merged in later with sculpt-dev's DynTopo implementation. # Supports vertex color and UV attributes only; other types can be added fairly easily though. # Workbench only sends the active vertex color and UV layers to the GPU. # Added a new draw engine API method, DRW_cdlayer_attr_aliases_add. Please review. # The vertex format object is now stored in the pbvh. Reviewed By: Clément Foucault & Brecht Van Lommel & Jeroen Bakker Differential Revision: https://developer.blender.org/D13897 Ref D13897
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_mesh.cc')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.cc b/source/blender/draw/intern/draw_cache_impl_mesh.cc
index ec71250b63b..1b45f3f88dd 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.cc
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.cc
@@ -744,7 +744,8 @@ static bool mesh_batch_cache_valid(Object *object, Mesh *me)
}
if (object->sculpt && object->sculpt->pbvh) {
- if (cache->pbvh_is_drawing != BKE_pbvh_is_drawing(object->sculpt->pbvh)) {
+ if (cache->pbvh_is_drawing != BKE_pbvh_is_drawing(object->sculpt->pbvh) ||
+ BKE_pbvh_draw_cache_invalid(object->sculpt->pbvh)) {
return false;
}