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:
authorClément Foucault <foucault.clem@gmail.com>2019-04-19 03:22:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-04-19 16:19:43 +0300
commit223f7e79f9fa221f60841afcff9a9ed8a97d9306 (patch)
treec39a9af28d6f8ad4cc386972e2f67677224d6b7a /source/blender/draw/DRW_engine.h
parent973e64cf9cb23b91e329ebac9a0f4c69647edf20 (diff)
DRW: Add batch garbage collection
This is only working for shading batches for the moment and only if some Custom data layer are not needed anymore. The collection rate is hardcoded at 60 sec but could be exposed to the user. This system can be extended and discard most unused batches in the future. This commit is in prevision of removing BKE_MESH_BATCH_DIRTY_SHADING when changing shader parameters.
Diffstat (limited to 'source/blender/draw/DRW_engine.h')
-rw-r--r--source/blender/draw/DRW_engine.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h
index 161e28db2d3..8ff4fbbe5a5 100644
--- a/source/blender/draw/DRW_engine.h
+++ b/source/blender/draw/DRW_engine.h
@@ -152,6 +152,9 @@ void DRW_opengl_context_destroy(void);
void DRW_opengl_context_enable(void);
void DRW_opengl_context_disable(void);
+/* For garbage collection */
+void DRW_cache_free_old_batches(struct Main *bmain);
+
/* Never use this. Only for closing blender. */
void DRW_opengl_context_enable_ex(bool restore);
void DRW_opengl_context_disable_ex(bool restore);