Blender V4.3
blender::draw::TextureRef Class Reference

#include <DRW_gpu_wrapper.hh>

Inherits blender::draw::Texture.

Public Member Functions

 TextureRef ()=default
 
 ~TextureRef ()
 
void wrap (GPUTexture *tex)
 
bool ensure_1d (int, int, eGPUTextureFormat, const float *)=delete
 
bool ensure_1d_array (int, int, int, eGPUTextureFormat, const float *)=delete
 
bool ensure_2d (int, int, int, eGPUTextureFormat, const float *)=delete
 
bool ensure_2d_array (int, int, int, int, eGPUTextureFormat, const float *)=delete
 
bool ensure_3d (int, int, int, int, eGPUTextureFormat, const float *)=delete
 
bool ensure_cube (int, int, eGPUTextureFormat, const float *)=delete
 
bool ensure_cube_array (int, int, int, eGPUTextureFormat, const float *)=delete
 
void filter_mode (bool)=delete
 
void free ()=delete
 
GPUTexture * mip_view (int)=delete
 
GPUTexture * layer_view (int)=delete
 
GPUTexture * stencil_view ()=delete
 
- Public Member Functions inherited from blender::draw::Texture
 Texture (const char *name="gpu::Texture")
 
 Texture (const char *name, eGPUTextureFormat format, eGPUTextureUsage usage, int extent, const float *data=nullptr, bool cubemap=false, int mip_len=1)
 
 Texture (const char *name, eGPUTextureFormat format, eGPUTextureUsage usage, int extent, int layers, const float *data=nullptr, bool cubemap=false, int mip_len=1)
 
 Texture (const char *name, eGPUTextureFormat format, eGPUTextureUsage usage, int2 extent, const float *data=nullptr, int mip_len=1)
 
 Texture (const char *name, eGPUTextureFormat format, eGPUTextureUsage usage, int2 extent, int layers, const float *data=nullptr, int mip_len=1)
 
 Texture (const char *name, eGPUTextureFormat format, eGPUTextureUsage usage, int3 extent, const float *data=nullptr, int mip_len=1)
 
 Texture (Texture &&other)=default
 
 ~Texture ()
 
GPUTexture * gpu_texture ()
 
 operator GPUTexture * () const
 
GPUTexture ** operator& ()
 
Textureptr ()
 
Textureoperator= (Texture &&a)
 
bool ensure_1d (eGPUTextureFormat format, int extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
 
bool ensure_1d_array (eGPUTextureFormat format, int extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
 
bool ensure_2d (eGPUTextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
 
bool ensure_2d_array (eGPUTextureFormat format, int2 extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
 
bool ensure_3d (eGPUTextureFormat format, int3 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
 
bool ensure_cube (eGPUTextureFormat format, int extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, float *data=nullptr, int mip_len=1)
 
bool ensure_cube_array (eGPUTextureFormat 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)
 
GPUTexture * mip_view (int miplvl)
 
int mip_count () const
 
bool ensure_layer_views (bool cube_as_array=false)
 
GPUTexture * layer_view (int layer)
 
GPUTexture * stencil_view (bool cube_as_array=false)
 
GPUTexture * layer_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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from blender::draw::Texture
static void swap (Texture &a, Texture &b)
 
- Protected Attributes inherited from blender::draw::Texture
GPUTexture * tx_ = nullptr
 
GPUTexture * stencil_view_ = nullptr
 
Vector< GPUTexture *, 0 > mip_views_
 
Vector< GPUTexture *, 0 > layer_views_
 
GPUTexture * layer_range_view_ = nullptr
 
const char * name_
 

Detailed Description

Definition at line 1135 of file DRW_gpu_wrapper.hh.

Constructor & Destructor Documentation

◆ TextureRef()

blender::draw::TextureRef::TextureRef ( )
default

◆ ~TextureRef()

blender::draw::TextureRef::~TextureRef ( )
inline

Definition at line 1139 of file DRW_gpu_wrapper.hh.

Member Function Documentation

◆ ensure_1d()

bool blender::draw::TextureRef::ensure_1d ( int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

Remove methods that are forbidden with this type of textures.

◆ ensure_1d_array()

bool blender::draw::TextureRef::ensure_1d_array ( int ,
int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

◆ ensure_2d()

bool blender::draw::TextureRef::ensure_2d ( int ,
int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

◆ ensure_2d_array()

bool blender::draw::TextureRef::ensure_2d_array ( int ,
int ,
int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

◆ ensure_3d()

bool blender::draw::TextureRef::ensure_3d ( int ,
int ,
int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

◆ ensure_cube()

bool blender::draw::TextureRef::ensure_cube ( int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

◆ ensure_cube_array()

bool blender::draw::TextureRef::ensure_cube_array ( int ,
int ,
int ,
eGPUTextureFormat ,
const float *  )
delete

◆ filter_mode()

void blender::draw::TextureRef::filter_mode ( bool )
delete

◆ free()

void blender::draw::TextureRef::free ( )
delete

◆ layer_view()

GPUTexture * blender::draw::TextureRef::layer_view ( int )
delete

◆ mip_view()

GPUTexture * blender::draw::TextureRef::mip_view ( int )
delete

◆ stencil_view()

GPUTexture * blender::draw::TextureRef::stencil_view ( )
delete

◆ wrap()

void blender::draw::TextureRef::wrap ( GPUTexture * tex)
inline

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