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:
Diffstat (limited to 'source/blender/gpu/opengl/gl_context.hh')
-rw-r--r--source/blender/gpu/opengl/gl_context.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh
index bc7e2060804..9e6359fabad 100644
--- a/source/blender/gpu/opengl/gl_context.hh
+++ b/source/blender/gpu/opengl/gl_context.hh
@@ -30,6 +30,8 @@
#include "BLI_set.hh"
#include "BLI_vector.hh"
+#include "gl_state.hh"
+
#include "glew-mx.h"
#include <mutex>
@@ -83,6 +85,12 @@ class GLContext : public GPUContext {
void activate(void) override;
void deactivate(void) override;
+ static inline GLStateManager *state_manager_active_get()
+ {
+ GLContext *ctx = static_cast<GLContext *>(GPU_context_active_get());
+ return static_cast<GLStateManager *>(ctx->state_manager);
+ };
+
/* TODO(fclem) these needs to become private. */
public:
void orphans_add(Vector<GLuint> &orphan_list, std::mutex &list_mutex, GLuint id);