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>2020-09-08 01:10:37 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-08 05:15:50 +0300
commit77f60a09310dad0cb41e2e2ec4a71f9bdb762e67 (patch)
tree4f01eefdae310450525712f955d03e7329eec07a /source/blender/gpu/opengl/gl_context.cc
parentf23400490e236ebbb01e6d2abfae6d8041aac2b1 (diff)
GPUState: Encapsulate glFlush and glFinish inside the GLContext
Part of the Vulkan task T68990 Isolate the few remaining gl functions.
Diffstat (limited to 'source/blender/gpu/opengl/gl_context.cc')
-rw-r--r--source/blender/gpu/opengl/gl_context.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index 5633d28023a..1f7e191d394 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -161,6 +161,22 @@ void GLContext::deactivate(void)
/** \} */
/* -------------------------------------------------------------------- */
+/** \name Flush, Finish & sync
+ * \{ */
+
+void GLContext::flush(void)
+{
+ glFlush();
+}
+
+void GLContext::finish(void)
+{
+ glFinish();
+}
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
/** \name Safe object deletion
*
* GPU objects can be freed when the context is not bound.