Blender V5.0
blender::draw::overlay::TextureFromPool Class Reference

#include <DRW_gpu_wrapper.hh>

Inherits blender::draw::Texture, and blender::NonMovable.

Public Member Functions

 TextureFromPool (const char *name="gpu::Texture")
void acquire (int2 extent, blender::gpu::TextureFormat format, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL)
void release ()
TextureFromPoolptr ()
bool ensure_1d (int, int, blender::gpu::TextureFormat, eGPUTextureUsage, const float *)=delete
bool ensure_1d_array (int, int, int, blender::gpu::TextureFormat, eGPUTextureUsage, const float *)=delete
bool ensure_2d (int, int, int, blender::gpu::TextureFormat, eGPUTextureUsage, float *)=delete
bool ensure_2d_array (int, int, int, int, blender::gpu::TextureFormat, eGPUTextureUsage, const float *)=delete
bool ensure_3d (int, int, int, int, blender::gpu::TextureFormat, eGPUTextureUsage, const float *)=delete
bool ensure_cube (int, int, blender::gpu::TextureFormat, eGPUTextureUsage, const float *)=delete
bool ensure_cube_array (int, int, int, blender::gpu::TextureFormat, eGPUTextureUsage, const float *)=delete
void filter_mode (bool)=delete
void free ()=delete
gpu::Texturemip_view (int)=delete
gpu::Texturelayer_view (int)=delete
gpu::Texturestencil_view ()=delete
Public Member Functions inherited from blender::draw::Texture
 Texture (const char *name="gpu::Texture")
 Texture (const char *name, blender::gpu::TextureFormat format, eGPUTextureUsage usage, int extent, const float *data=nullptr, bool cubemap=false, int mip_len=1)
 Texture (const char *name, blender::gpu::TextureFormat format, eGPUTextureUsage usage, int extent, int layers, const float *data=nullptr, bool cubemap=false, int mip_len=1)
 Texture (const char *name, blender::gpu::TextureFormat format, eGPUTextureUsage usage, int2 extent, const float *data=nullptr, int mip_len=1)
 Texture (const char *name, blender::gpu::TextureFormat format, eGPUTextureUsage usage, int2 extent, int layers, const float *data=nullptr, int mip_len=1)
 Texture (const char *name, blender::gpu::TextureFormat format, eGPUTextureUsage usage, int3 extent, const float *data=nullptr, int mip_len=1)
 Texture (Texture &&other)=default
 ~Texture ()
gpu::Texturegpu_texture ()
 operator gpu::Texture * () const
gpu::Texture ** operator& ()
Textureptr ()
Textureoperator= (Texture &&a)
bool ensure_1d (blender::gpu::TextureFormat format, int extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_1d_array (blender::gpu::TextureFormat format, int extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_2d (blender::gpu::TextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_2d_array (blender::gpu::TextureFormat format, int2 extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_3d (blender::gpu::TextureFormat format, int3 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_cube (blender::gpu::TextureFormat format, int extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, float *data=nullptr, int mip_len=1)
bool ensure_cube_array (blender::gpu::TextureFormat format, int extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_mip_views (bool cube_as_array=false)
gpu::Texturemip_view (int miplvl)
int mip_count () const
bool ensure_layer_views (bool cube_as_array=false)
gpu::Texturelayer_view (int layer)
gpu::Texturestencil_view (bool cube_as_array=false)
gpu::Texturelayer_range_view (int layer_start, int layer_len, bool cube_as_array=false)
bool is_valid () const
int width () const
int height () const
int depth () const
int pixel_count () const
bool is_depth () const
bool is_stencil () const
bool is_integer () const
bool is_cube () const
bool is_array () const
int3 size (int miplvl=0) const
void clear (float4 values)
void clear (uint4 values)
void clear (int4 values)
void debug_clear ()
template<typename T>
Tread (eGPUDataFormat format, int miplvl=0)
void filter_mode (bool do_filter)
void free ()

Static Public Member Functions

static void swap (TextureFromPool &a, Texture &b)
static void swap (Texture &a, TextureFromPool &b)
static void swap (TextureFromPool &a, TextureFromPool &b)
Static Public Member Functions inherited from blender::draw::Texture
static void swap (Texture &a, Texture &b)

Additional Inherited Members

Protected Member Functions inherited from blender::draw::Texture
void free_texture_views ()
Protected Attributes inherited from blender::draw::Texture
gpu::Texturetx_ = nullptr
gpu::Texturestencil_view_ = nullptr
Vector< gpu::Texture *, 0 > mip_views_
Vector< gpu::Texture *, 0 > layer_views_
gpu::Texturelayer_range_view_ = nullptr
const char * name_

Detailed Description

Definition at line 1066 of file DRW_gpu_wrapper.hh.

Constructor & Destructor Documentation

◆ TextureFromPool()

blender::draw::TextureFromPool::TextureFromPool ( const char * name = "gpu::Texture")
inline

Definition at line 1068 of file DRW_gpu_wrapper.hh.

Member Function Documentation

◆ acquire()

◆ ensure_1d()

Remove methods that are forbidden with this type of textures.

◆ ensure_1d_array()

◆ ensure_2d()

◆ ensure_2d_array()

◆ ensure_3d()

◆ ensure_cube()

◆ ensure_cube_array()

◆ filter_mode()

◆ free()

◆ layer_view()

◆ mip_view()

◆ ptr()

WORKAROUND: used when needing a ref to the Texture and not the gpu::Texture.

Definition at line 1114 of file DRW_gpu_wrapper.hh.

◆ release()

Definition at line 1084 of file DRW_gpu_wrapper.hh.

◆ stencil_view()

◆ swap() [1/3]

Definition at line 1104 of file DRW_gpu_wrapper.hh.

◆ swap() [2/3]

Swap the content of the two textures. Also change ownership accordingly if needed.

Definition at line 1098 of file DRW_gpu_wrapper.hh.

◆ swap() [3/3]

Definition at line 1108 of file DRW_gpu_wrapper.hh.


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