|
Blender V4.3
|
Inherits blender::realtime_compositor::TexturePool.
Public Member Functions | |
| virtual | ~TexturePool () |
| GPUTexture * | allocate_texture (int2 size, eGPUTextureFormat format) override |
| void | free_unused_and_reset () |
Public Member Functions inherited from blender::realtime_compositor::TexturePool | |
| GPUTexture * | acquire (int2 size, eGPUTextureFormat format) |
| void | release (GPUTexture *texture) |
| void | reset () |
TODO: should share pool with draw manager. It needs some globals initialization figured out there first.
Definition at line 51 of file render/intern/compositor.cc.
|
inlinevirtual |
Definition at line 63 of file render/intern/compositor.cc.
References GPU_texture_free(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
|
inlineoverridevirtual |
Implements blender::realtime_compositor::TexturePool.
Definition at line 78 of file render/intern/compositor.cc.
References GPU_texture_create_2d(), GPU_TEXTURE_USAGE_GENERAL, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), and texture.
|
inline |
Should be called after compositor evaluation to free unused textures and reset the texture pool.
Definition at line 102 of file render/intern/compositor.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), GPU_texture_free(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().