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:
authorDalai Felinto <dalai@blender.org>2020-08-06 15:23:39 +0300
committerDalai Felinto <dalai@blender.org>2020-08-06 17:44:03 +0300
commit45e6ca36615fe9a720c9f25343556326fcbd5952 (patch)
treea98d1489550db05c6d2c114f2a9068a34d20afbf /source/blender/gpu/intern
parent5e6119ddca1fc637a6658cd58e9c04f40f155314 (diff)
Cleanup: Stop accessing gpu_batch_presets_reset()
The current code is accessing this from outside the gpu "namespace". As such it should be accessing GPU_ functions, not gpu_ functions. This is also a place to centralize the XXX message that will be addressed upon refactor. So we can reuse this call in other places that need the same temporary workaround. Groundwork for upcoming fix (D8472)
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_batch_presets.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_batch_presets.c b/source/blender/gpu/intern/gpu_batch_presets.c
index d16edab5ac9..7f842d4d508 100644
--- a/source/blender/gpu/intern/gpu_batch_presets.c
+++ b/source/blender/gpu/intern/gpu_batch_presets.c
@@ -406,4 +406,17 @@ void gpu_batch_presets_exit(void)
BLI_mutex_end(&g_presets_3d.mutex);
}
+/**
+ * This function only needs to be accessed externally because
+ * we are drawing UI batches with the DRW old context.
+ *
+ * And now we use it for drawing the entire area.
+ *
+ * XXX (Clément) - to cleanup in the upcoming 2.91 refactor.
+ **/
+void GPU_batch_presets_reset()
+{
+ gpu_batch_presets_reset();
+}
+
/** \} */