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_backend.hh')
-rw-r--r--source/blender/gpu/opengl/gl_backend.hh23
1 files changed, 22 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.hh b/source/blender/gpu/opengl/gl_backend.hh
index 25400a55394..f7c01b2f184 100644
--- a/source/blender/gpu/opengl/gl_backend.hh
+++ b/source/blender/gpu/opengl/gl_backend.hh
@@ -25,12 +25,33 @@
#include "gpu_backend.hh"
+#include "BLI_vector.hh"
+
#include "gl_context.hh"
+namespace blender {
+namespace gpu {
+
class GLBackend : public GPUBackend {
+ private:
+ GLSharedOrphanLists shared_orphan_list_;
+
public:
GPUContext *context_alloc(void *ghost_window)
{
- return new GLContext(ghost_window);
+ return new GLContext(ghost_window, shared_orphan_list_);
};
+
+ /* TODO remove */
+ void buf_free(GLuint buf_id);
+ void tex_free(GLuint tex_id);
+ void orphans_add(Vector<GLuint> &orphan_list, std::mutex &list_mutex, unsigned int id)
+ {
+ list_mutex.lock();
+ orphan_list.append(id);
+ list_mutex.unlock();
+ }
};
+
+} // namespace gpu
+} // namespace blender