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.cc
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.cc')
-rw-r--r--source/blender/gpu/opengl/gl_context.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index ecf74a1993d..5633d28023a 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -230,25 +230,27 @@ void GLContext::fbo_free(GLuint fbo_id)
}
}
-void GLBackend::buf_free(GLuint buf_id)
+void GLContext::buf_free(GLuint buf_id)
{
/* Any context can free. */
if (GPU_context_active_get()) {
glDeleteBuffers(1, &buf_id);
}
else {
- orphans_add(shared_orphan_list_.buffers, shared_orphan_list_.lists_mutex, buf_id);
+ GLSharedOrphanLists &orphan_list = GLBackend::get()->shared_orphan_list_get();
+ orphans_add(orphan_list.buffers, orphan_list.lists_mutex, buf_id);
}
}
-void GLBackend::tex_free(GLuint tex_id)
+void GLContext::tex_free(GLuint tex_id)
{
/* Any context can free. */
if (GPU_context_active_get()) {
glDeleteTextures(1, &tex_id);
}
else {
- orphans_add(shared_orphan_list_.textures, shared_orphan_list_.lists_mutex, tex_id);
+ GLSharedOrphanLists &orphan_list = GLBackend::get()->shared_orphan_list_get();
+ orphans_add(orphan_list.textures, orphan_list.lists_mutex, tex_id);
}
}