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-07 21:08:25 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-07 21:17:45 +0300
commit19f56cfe6c59e3a54aaf7499fd9072a8790171b7 (patch)
tree3db73ef6ceb2586175249344bf4564457ad2fbc5 /source/blender/gpu/opengl/gl_context.hh
parent58353834f441b8b4ca91dcd4ec94ac49bbbf5ab0 (diff)
Cleanup: GLBackend: Move buf_free and tex_free to GLContext
This makes it easier to follow. Also removes the GL related functions inside gpu_context.cc.
Diffstat (limited to 'source/blender/gpu/opengl/gl_context.hh')
-rw-r--r--source/blender/gpu/opengl/gl_context.hh12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh
index 06e59724f4a..f05029c7075 100644
--- a/source/blender/gpu/opengl/gl_context.hh
+++ b/source/blender/gpu/opengl/gl_context.hh
@@ -105,13 +105,17 @@ class GLContext : public GPUContext {
return static_cast<GLStateManager *>(ctx->state_manager);
};
+ /* These need to be called with the context the id was created with. */
+ void vao_free(GLuint vao_id);
+ void fbo_free(GLuint fbo_id);
+ /* These can be called by any threads even without OpenGL ctx. Deletion will be delayed. */
+ static void buf_free(GLuint buf_id);
+ static void tex_free(GLuint tex_id);
+
/* TODO(fclem) these needs to become private. */
public:
- void orphans_add(Vector<GLuint> &orphan_list, std::mutex &list_mutex, GLuint id);
+ static void orphans_add(Vector<GLuint> &orphan_list, std::mutex &list_mutex, GLuint id);
void orphans_clear(void);
-
- void vao_free(GLuint vao_id);
- void fbo_free(GLuint fbo_id);
void vao_cache_register(GLVaoCache *cache);
void vao_cache_unregister(GLVaoCache *cache);
};