Blender
V3.3
|
#include <gl_context.hh>
Public Member Functions | |
Safe object deletion | |
GPU objects can be freed when the context is not bound. In this case we delay the deletion until the context is bound again. | |
void | orphans_clear () |
Public Attributes | |
std::mutex | lists_mutex |
Vector< GLuint > | textures |
Vector< GLuint > | buffers |
Definition at line 28 of file gl_context.hh.
void GLSharedOrphanLists::orphans_clear | ( | ) |
Definition at line 187 of file gl_context.cc.
References BLI_assert, buffers, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::gpu::GLContext::get(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), lists_mutex, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and textures.
Vector<GLuint> blender::gpu::GLSharedOrphanLists::buffers |
Definition at line 34 of file gl_context.hh.
Referenced by blender::gpu::GLContext::buf_free(), and orphans_clear().
std::mutex blender::gpu::GLSharedOrphanLists::lists_mutex |
Mutex for the below structures.
Definition at line 31 of file gl_context.hh.
Referenced by blender::gpu::GLContext::buf_free(), orphans_clear(), and blender::gpu::GLContext::tex_free().
Vector<GLuint> blender::gpu::GLSharedOrphanLists::textures |
Buffers and textures are shared across context. Any context can free them.
Definition at line 33 of file gl_context.hh.
Referenced by orphans_clear(), and blender::gpu::GLContext::tex_free().