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.hh13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh
index ef0c13719e2..63014903e0a 100644
--- a/source/blender/gpu/opengl/gl_context.hh
+++ b/source/blender/gpu/opengl/gl_context.hh
@@ -53,7 +53,7 @@ class GLSharedOrphanLists {
void orphans_clear(void);
};
-class GLContext : public GPUContext {
+class GLContext : public Context {
public:
/** Capabilities. */
static GLint max_texture_3d_size;
@@ -103,9 +103,14 @@ class GLContext : public GPUContext {
void memory_statistics_get(int *total_mem, int *free_mem) override;
- static inline GLStateManager *state_manager_active_get()
+ static GLContext *get()
{
- GLContext *ctx = static_cast<GLContext *>(GPU_context_active_get());
+ return static_cast<GLContext *>(Context::get());
+ }
+
+ static GLStateManager *state_manager_active_get()
+ {
+ GLContext *ctx = GLContext::get();
return static_cast<GLStateManager *>(ctx->state_manager);
};
@@ -122,6 +127,8 @@ class GLContext : public GPUContext {
private:
static void orphans_add(Vector<GLuint> &orphan_list, std::mutex &list_mutex, GLuint id);
void orphans_clear(void);
+
+ MEM_CXX_CLASS_ALLOC_FUNCS("GLContext")
};
} // namespace gpu