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 04:18:49 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-08 05:15:50 +0300
commitccc512cc619dc9f0e6fd79270a7a96ece34d23b5 (patch)
treeda728c4f3745fc352a5e223502ca8734c3c1f01b /source/blender/gpu/opengl
parentca8ffc523e3d08fc55c5cf000fa9fc3888950bf7 (diff)
GPUImmediate: Make activation / deactivation implicit
This avoids unecessary complexity. Also makes the GPUImmediate threadsafe by using a threadlocal imm variable.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r--source/blender/gpu/opengl/gl_context.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index 1f7e191d394..30279ccade1 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -32,6 +32,7 @@
#include "GHOST_C-api.h"
#include "gpu_context_private.hh"
+#include "gpu_immediate_private.hh"
#include "gl_debug.hh"
#include "gl_immediate.hh"
@@ -151,10 +152,13 @@ void GLContext::activate(void)
/* Not really following the state but we should consider
* no ubo bound when activating a context. */
bound_ubo_slots = 0;
+
+ immActivate();
}
void GLContext::deactivate(void)
{
+ immDeactivate();
is_active_ = false;
}