Blender V4.3
blender::gpu::GLSharedOrphanLists Class Reference

#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

Detailed Description

Definition at line 27 of file gl_context.hh.

Member Function Documentation

◆ orphans_clear()

void GLSharedOrphanLists::orphans_clear ( )

Definition at line 191 of file gl_context.cc.

References BLI_assert, buffers, blender::gpu::GLContext::get(), lists_mutex, and textures.

Member Data Documentation

◆ buffers

Vector<GLuint> blender::gpu::GLSharedOrphanLists::buffers

Definition at line 33 of file gl_context.hh.

Referenced by blender::gpu::GLContext::buf_free(), and orphans_clear().

◆ lists_mutex

std::mutex blender::gpu::GLSharedOrphanLists::lists_mutex

Mutex for the below structures.

Definition at line 30 of file gl_context.hh.

Referenced by blender::gpu::GLContext::buf_free(), orphans_clear(), and blender::gpu::GLContext::tex_free().

◆ textures

Vector<GLuint> blender::gpu::GLSharedOrphanLists::textures

Buffers and textures are shared across context. Any context can free them.

Definition at line 32 of file gl_context.hh.

Referenced by orphans_clear(), and blender::gpu::GLContext::tex_free().


The documentation for this class was generated from the following files: