Blender
V3.3
|
#include <DRW_gpu_wrapper.hh>
Public Member Functions | |
Texture (const char *name="gpu::Texture") | |
Texture (const char *name, eGPUTextureFormat format, int extent, float *data=nullptr, bool cubemap=false, int mip_len=1) | |
Texture (const char *name, eGPUTextureFormat format, int extent, int layers, float *data=nullptr, bool cubemap=false, int mip_len=1) | |
Texture (const char *name, eGPUTextureFormat format, int2 extent, float *data=nullptr, int mip_len=1) | |
Texture (const char *name, eGPUTextureFormat format, int2 extent, int layers, float *data=nullptr, int mip_len=1) | |
Texture (const char *name, eGPUTextureFormat format, int3 extent, float *data=nullptr, int mip_len=1) | |
~Texture () | |
operator GPUTexture * () const | |
GPUTexture ** | operator& () |
Texture & | operator= (Texture &&a) |
bool | ensure_1d (eGPUTextureFormat format, int extent, float *data=nullptr, int mip_len=1) |
bool | ensure_1d_array (eGPUTextureFormat format, int extent, int layers, float *data=nullptr, int mip_len=1) |
bool | ensure_2d (eGPUTextureFormat format, int2 extent, float *data=nullptr, int mip_len=1) |
bool | ensure_2d_array (eGPUTextureFormat format, int2 extent, int layers, float *data=nullptr, int mip_len=1) |
bool | ensure_3d (eGPUTextureFormat format, int3 extent, float *data=nullptr, int mip_len=1) |
bool | ensure_cube (eGPUTextureFormat format, int extent, float *data=nullptr, int mip_len=1) |
bool | ensure_cube_array (eGPUTextureFormat format, int extent, int layers, float *data=nullptr, int mip_len=1) |
bool | ensure_mip_views (bool cube_as_array=false) |
GPUTexture * | mip_view (int miplvl) |
bool | ensure_layer_views (bool cube_as_array=false) |
GPUTexture * | layer_view (int layer) |
GPUTexture * | stencil_view (bool cube_as_array=false) |
bool | is_valid (void) const |
int | width (void) const |
int | height (void) const |
bool | depth (void) const |
bool | is_stencil (void) const |
bool | is_integer (void) const |
bool | is_cube (void) const |
bool | is_array (void) const |
int3 | size (int miplvl=0) const |
void | clear (float4 values) |
void | clear (uint4 values) |
void | clear (int4 values) |
template<typename T > | |
T * | read (eGPUDataFormat format, int miplvl=0) |
void | filter_mode (bool do_filter) |
void | free () |
Static Public Member Functions | |
static void | swap (Texture &a, Texture &b) |
Protected Attributes | |
GPUTexture * | tx_ = nullptr |
GPUTexture * | stencil_view_ = nullptr |
Vector< GPUTexture *, 0 > | mip_views_ |
Vector< GPUTexture *, 0 > | layer_views_ |
const char * | name_ |
Definition at line 377 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 386 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 390 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 401 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 413 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 423 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 434 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 444 of file DRW_gpu_wrapper.hh.
References free().
Clear the entirety of the texture using one pixel worth of data.
Definition at line 654 of file DRW_gpu_wrapper.hh.
References GPU_DATA_FLOAT, GPU_texture_clear(), and tx_.
Clear the entirety of the texture using one pixel worth of data.
Definition at line 670 of file DRW_gpu_wrapper.hh.
References GPU_DATA_INT, GPU_texture_clear(), and tx_.
Clear the entirety of the texture using one pixel worth of data.
Definition at line 662 of file DRW_gpu_wrapper.hh.
References GPU_DATA_UINT, GPU_texture_clear(), and tx_.
Definition at line 619 of file DRW_gpu_wrapper.hh.
References GPU_texture_depth(), and tx_.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 476 of file DRW_gpu_wrapper.hh.
References data.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 485 of file DRW_gpu_wrapper.hh.
References data.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 495 of file DRW_gpu_wrapper.hh.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 504 of file DRW_gpu_wrapper.hh.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 514 of file DRW_gpu_wrapper.hh.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 523 of file DRW_gpu_wrapper.hh.
References data.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 532 of file DRW_gpu_wrapper.hh.
References data.
Ensure the availability of mipmap views. Layer views covers all layers of array textures. Returns true if the views were (re)created.
Definition at line 569 of file DRW_gpu_wrapper.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), GPU_texture_create_view(), GPU_texture_format(), GPU_TEXTURE_FREE_SAFE, GPU_texture_layer_count(), layer_views_, name_, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), tx_, and view.
Ensure the availability of mipmap views. MIP view covers all layers of array textures.
Definition at line 542 of file DRW_gpu_wrapper.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), GPU_texture_create_view(), GPU_texture_format(), GPU_TEXTURE_FREE_SAFE, GPU_texture_mip_count(), mip_views_, name_, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), tx_, and view.
Definition at line 684 of file DRW_gpu_wrapper.hh.
References GPU_texture_filter_mode(), and tx_.
|
inline |
Free the internal texture but not the #draw::Texture itself.
Definition at line 692 of file DRW_gpu_wrapper.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), GPU_TEXTURE_FREE_SAFE, layer_views_, mip_views_, stencil_view_, tx_, and view.
Referenced by ~Texture().
|
inline |
Definition at line 614 of file DRW_gpu_wrapper.hh.
References GPU_texture_height(), and tx_.
Definition at line 639 of file DRW_gpu_wrapper.hh.
References GPU_texture_array(), and tx_.
Definition at line 634 of file DRW_gpu_wrapper.hh.
References GPU_texture_cube(), and tx_.
Definition at line 629 of file DRW_gpu_wrapper.hh.
References GPU_texture_integer(), and tx_.
Definition at line 624 of file DRW_gpu_wrapper.hh.
References GPU_texture_stencil(), and tx_.
Returns true if the texture has been allocated or acquired from the pool.
Definition at line 604 of file DRW_gpu_wrapper.hh.
References tx_.
|
inline |
Definition at line 586 of file DRW_gpu_wrapper.hh.
References layer_views_.
|
inline |
Definition at line 559 of file DRW_gpu_wrapper.hh.
References mip_views_.
|
inline |
Definition at line 450 of file DRW_gpu_wrapper.hh.
References BLI_assert, and tx_.
|
inline |
Definition at line 457 of file DRW_gpu_wrapper.hh.
References tx_.
Definition at line 462 of file DRW_gpu_wrapper.hh.
References Freestyle::a.
|
inline |
Returns a buffer containing the texture data for the specified miplvl. The memory block needs to be manually freed by MEM_freeN().
Definition at line 679 of file DRW_gpu_wrapper.hh.
References GPU_texture_read(), T, and tx_.
|
inline |
Definition at line 644 of file DRW_gpu_wrapper.hh.
References GPU_texture_get_mipmap_size(), and tx_.
|
inline |
Definition at line 591 of file DRW_gpu_wrapper.hh.
References GPU_texture_create_view(), GPU_texture_format(), GPU_texture_stencil_texture_mode_set(), name_, stencil_view_, and tx_.
Swap the content of the two textures.
Definition at line 708 of file DRW_gpu_wrapper.hh.
References Freestyle::a, usdtokens::b(), and SWAP.
|
inline |
Definition at line 609 of file DRW_gpu_wrapper.hh.
References GPU_texture_width(), and tx_.
|
protected |
Definition at line 382 of file DRW_gpu_wrapper.hh.
Referenced by ensure_layer_views(), free(), and layer_view().
|
protected |
Definition at line 381 of file DRW_gpu_wrapper.hh.
Referenced by ensure_mip_views(), free(), and mip_view().
|
protected |
Definition at line 383 of file DRW_gpu_wrapper.hh.
Referenced by ensure_layer_views(), ensure_mip_views(), and stencil_view().
|
protected |
Definition at line 380 of file DRW_gpu_wrapper.hh.
Referenced by free(), and stencil_view().
|
protected |
Definition at line 379 of file DRW_gpu_wrapper.hh.
Referenced by clear(), depth(), ensure_layer_views(), ensure_mip_views(), filter_mode(), free(), height(), is_array(), is_cube(), is_integer(), is_stencil(), is_valid(), operator GPUTexture *(), operator&(), read(), blender::draw::TextureFromPool::release(), size(), stencil_view(), Texture(), and width().