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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-08-23 19:28:55 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-08-23 19:44:31 +0300
commitbe1891e895c012b36ca574a90b5d90fc1433152e (patch)
tree793eaf2cb310b91156e8ebf778d1aae8279a248b /source/blender/draw/intern/draw_cache_extract.h
parentcbe4036406ed21d5659b266dddbbe03a1a945721 (diff)
Cleanup: move the buffer list to 'MeshBufferCache'
The cache is used to fill the buffer list.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract.h')
-rw-r--r--source/blender/draw/intern/draw_cache_extract.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h
index 855fef952d8..db96d6a774f 100644
--- a/source/blender/draw/intern/draw_cache_extract.h
+++ b/source/blender/draw/intern/draw_cache_extract.h
@@ -235,6 +235,8 @@ BLI_STATIC_ASSERT(MBC_BATCH_LEN < 32, "Number of batches exceeded the limit of b
* - Loose geometry.
*/
typedef struct MeshBufferCache {
+ MeshBufferList buff;
+
struct {
int edge_len;
int vert_len;
@@ -249,20 +251,15 @@ typedef struct MeshBufferCache {
} poly_sorted;
} MeshBufferCache;
-#define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbuflist) \
- for (MeshBufferList *mbuflist = &batch_cache->final; \
- mbuflist == &batch_cache->final || mbuflist == &batch_cache->cage || \
- mbuflist == &batch_cache->uv_cage; \
- mbuflist = (mbuflist == &batch_cache->final) ? \
- &batch_cache->cage : \
- ((mbuflist == &batch_cache->cage) ? &batch_cache->uv_cage : NULL))
+#define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbc) \
+ for (MeshBufferCache *mbc = &batch_cache->final; \
+ mbc == &batch_cache->final || mbc == &batch_cache->cage || mbc == &batch_cache->uv_cage; \
+ mbc = (mbc == &batch_cache->final) ? \
+ &batch_cache->cage : \
+ ((mbc == &batch_cache->cage) ? &batch_cache->uv_cage : NULL))
typedef struct MeshBatchCache {
- MeshBufferList final, cage, uv_cage;
-
- MeshBufferCache final_extraction_cache;
- MeshBufferCache cage_extraction_cache;
- MeshBufferCache uv_cage_extraction_cache;
+ MeshBufferCache final, cage, uv_cage;
MeshBatchList batch;
@@ -307,8 +304,7 @@ typedef struct MeshBatchCache {
MBC_EDITUV_EDGES | MBC_EDITUV_VERTS | MBC_EDITUV_FACEDOTS | MBC_WIRE_LOOPS_UVS)
void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
- MeshBatchCache *cache,
- MeshBufferList *mbuflist,
+ MeshBatchCache *mbc,
MeshBufferCache *extraction_cache,
Mesh *me,
const bool is_editmode,