|
Blender
V2.93
|
#include <gpu_texture_private.hh>
Inherited by blender::gpu::GLTexture.
Public Member Functions | |
| virtual void | generate_mipmap (void)=0 |
| virtual void | copy_to (Texture *tex)=0 |
| virtual void | clear (eGPUDataFormat format, const void *data)=0 |
| virtual void | swizzle_set (const char swizzle_mask[4])=0 |
| virtual void | mip_range_set (int min, int max)=0 |
| virtual void * | read (int mip, eGPUDataFormat format)=0 |
| virtual void | update_sub (int mip, int offset[3], int extent[3], eGPUDataFormat format, const void *data)=0 |
| virtual uint | gl_bindcode_get (void) const =0 |
| int | width_get (void) const |
| int | height_get (void) const |
| int | depth_get (void) const |
| void | mip_size_get (int mip, int r_size[3]) const |
| int | mip_width_get (int mip) const |
| int | mip_height_get (int mip) const |
| int | mip_depth_get (int mip) const |
| int | dimensions_count (void) const |
| int | layer_count (void) const |
| eGPUTextureFormat | format_get (void) const |
| eGPUTextureFormatFlag | format_flag_get (void) const |
| eGPUTextureType | type_get (void) const |
| GPUAttachmentType | attachment_type (int slot) const |
Creation & Deletion | |
| Texture (const char *name) | |
| virtual | ~Texture () |
| bool | init_1D (int w, int layers, eGPUTextureFormat format) |
| bool | init_2D (int w, int h, int layers, eGPUTextureFormat format) |
| bool | init_3D (int w, int h, int d, eGPUTextureFormat format) |
| bool | init_cubemap (int w, int layers, eGPUTextureFormat format) |
| bool | init_buffer (GPUVertBuf *vbo, eGPUTextureFormat format) |
Operation | |
| void | attach_to (FrameBuffer *fb, GPUAttachmentType type) |
| void | detach_from (FrameBuffer *fb) |
| void | update (eGPUDataFormat format, const void *data) |
Public Attributes | |
| eGPUSamplerState | sampler_state = GPU_SAMPLER_DEFAULT |
| int | refcount = 1 |
| int | src_w = 0 |
| int | src_h = 0 |
Protected Member Functions | |
| virtual bool | init_internal (void)=0 |
| virtual bool | init_internal (GPUVertBuf *vbo)=0 |
Protected Attributes | |
| int | w_ |
| int | h_ |
| int | d_ |
| eGPUTextureFormat | format_ |
| eGPUTextureFormatFlag | format_flag_ |
| eGPUTextureType | type_ |
| int | mipmaps_ = -1 |
| int | mip_min_ = 0 |
| int | mip_max_ = 0 |
| char | name_ [DEBUG_NAME_LEN] |
| GPUAttachmentType | fb_attachment_ [GPU_TEX_MAX_FBO_ATTACHED] |
| FrameBuffer * | fb_ [GPU_TEX_MAX_FBO_ATTACHED] |
Implementation of Textures. Base class which is then specialized for each implementation (GL, VK, ...).
Definition at line 75 of file gpu_texture_private.hh.
| blender::gpu::Texture::Texture | ( | const char * | name | ) |
Definition at line 42 of file gpu_texture.cc.
References ARRAY_SIZE, BLI_strncpy(), fb_, and name_.
|
virtual |
Definition at line 56 of file gpu_texture.cc.
References ARRAY_SIZE, blender::gpu::FrameBuffer::attachment_remove(), fb_, and fb_attachment_.
| void blender::gpu::Texture::attach_to | ( | FrameBuffer * | fb, |
| GPUAttachmentType | type | ||
| ) |
Definition at line 142 of file gpu_texture.cc.
References ARRAY_SIZE, BLI_assert, fb(), fb_, fb_attachment_, and type.
|
inline |
Definition at line 226 of file gpu_texture_private.hh.
References BLI_assert, format_, GPU_DEPTH24_STENCIL8, GPU_DEPTH32F_STENCIL8, GPU_DEPTH_COMPONENT16, GPU_DEPTH_COMPONENT24, GPU_DEPTH_COMPONENT32F, GPU_FB_COLOR_ATTACHMENT0, GPU_FB_DEPTH_ATTACHMENT, and GPU_FB_DEPTH_STENCIL_ATTACHMENT.
Referenced by blender::gpu::GLTexture::clear().
|
pure virtual |
Implemented in blender::gpu::GLTexture.
|
pure virtual |
Implemented in blender::gpu::GLTexture.
Referenced by GPU_texture_copy().
|
inline |
Definition at line 144 of file gpu_texture_private.hh.
References d_.
| void blender::gpu::Texture::detach_from | ( | FrameBuffer * | fb | ) |
Definition at line 154 of file gpu_texture.cc.
References ARRAY_SIZE, blender::gpu::FrameBuffer::attachment_remove(), BLI_assert, fb(), fb_, and fb_attachment_.
|
inline |
Definition at line 184 of file gpu_texture_private.hh.
References blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_3D, blender::gpu::GPU_TEXTURE_ARRAY, blender::gpu::GPU_TEXTURE_BUFFER, blender::gpu::GPU_TEXTURE_CUBE, and type_.
Referenced by blender::gpu::GLTexture::update_sub().
|
inline |
Definition at line 218 of file gpu_texture_private.hh.
References format_flag_.
|
inline |
Definition at line 214 of file gpu_texture_private.hh.
References format_.
|
pure virtual |
Implemented in blender::gpu::GLTexture.
|
pure virtual |
Implemented in blender::gpu::GLTexture.
|
inline |
Definition at line 140 of file gpu_texture_private.hh.
References h_.
| bool blender::gpu::Texture::init_1D | ( | int | w, |
| int | layers, | ||
| eGPUTextureFormat | format | ||
| ) |
Definition at line 65 of file gpu_texture.cc.
References d_, format_, format_flag_, blender::gpu::GPU_FORMAT_DEPTH_STENCIL, blender::gpu::GPU_FORMAT_INTEGER, GPU_SAMPLER_FILTER, blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_1D_ARRAY, h_, init_internal(), sampler_state, blender::gpu::to_format_flag(), type_, w(), and w_.
| bool blender::gpu::Texture::init_2D | ( | int | w, |
| int | h, | ||
| int | layers, | ||
| eGPUTextureFormat | format | ||
| ) |
Definition at line 79 of file gpu_texture.cc.
References d_, format_, format_flag_, blender::gpu::GPU_FORMAT_DEPTH_STENCIL, blender::gpu::GPU_FORMAT_INTEGER, GPU_SAMPLER_FILTER, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_2D_ARRAY, h_, init_internal(), sampler_state, blender::gpu::to_format_flag(), type_, w(), and w_.
| bool blender::gpu::Texture::init_3D | ( | int | w, |
| int | h, | ||
| int | d, | ||
| eGPUTextureFormat | format | ||
| ) |
Definition at line 93 of file gpu_texture.cc.
References d_, format_, format_flag_, blender::gpu::GPU_FORMAT_DEPTH_STENCIL, blender::gpu::GPU_FORMAT_INTEGER, GPU_SAMPLER_FILTER, blender::gpu::GPU_TEXTURE_3D, h_, init_internal(), sampler_state, blender::gpu::to_format_flag(), type_, w(), and w_.
| bool blender::gpu::Texture::init_buffer | ( | GPUVertBuf * | vbo, |
| eGPUTextureFormat | format | ||
| ) |
Definition at line 121 of file gpu_texture.cc.
References d_, format_, format_flag_, GPU_DEPTH_COMPONENT24, blender::gpu::GPU_TEXTURE_BUFFER, GPU_vertbuf_get_vertex_len(), h_, init_internal(), blender::gpu::to_format_flag(), type_, and w_.
| bool blender::gpu::Texture::init_cubemap | ( | int | w, |
| int | layers, | ||
| eGPUTextureFormat | format | ||
| ) |
Definition at line 107 of file gpu_texture.cc.
References d_, format_, format_flag_, blender::gpu::GPU_FORMAT_DEPTH_STENCIL, blender::gpu::GPU_FORMAT_INTEGER, GPU_SAMPLER_FILTER, blender::gpu::GPU_TEXTURE_CUBE, blender::gpu::GPU_TEXTURE_CUBE_ARRAY, h_, init_internal(), max_ii(), sampler_state, blender::gpu::to_format_flag(), type_, w(), and w_.
|
protectedpure virtual |
Implemented in blender::gpu::GLTexture.
|
protectedpure virtual |
Implemented in blender::gpu::GLTexture.
Referenced by init_1D(), init_2D(), init_3D(), init_buffer(), and init_cubemap().
|
inline |
Definition at line 201 of file gpu_texture_private.hh.
References d_, blender::gpu::GPU_TEXTURE_1D_ARRAY, blender::gpu::GPU_TEXTURE_2D_ARRAY, blender::gpu::GPU_TEXTURE_CUBE_ARRAY, h_, and type_.
|
inline |
Definition at line 178 of file gpu_texture_private.hh.
References d_, blender::gpu::GPU_TEXTURE_ARRAY, blender::gpu::GPU_TEXTURE_CUBE, max_ii(), and type_.
|
inline |
Definition at line 174 of file gpu_texture_private.hh.
References blender::gpu::GPU_TEXTURE_1D_ARRAY, h_, max_ii(), and type_.
|
pure virtual |
Implemented in blender::gpu::GLTexture.
|
inline |
Definition at line 149 of file gpu_texture_private.hh.
References d_, blender::gpu::GPU_TEXTURE_1D_ARRAY, blender::gpu::GPU_TEXTURE_ARRAY, blender::gpu::GPU_TEXTURE_CUBE, h_, max_ii(), type_, and w_.
Referenced by blender::gpu::GLTexture::copy_to(), blender::gpu::GLTexture::read(), and update().
|
inline |
Definition at line 170 of file gpu_texture_private.hh.
|
pure virtual |
Implemented in blender::gpu::GLTexture.
|
pure virtual |
Implemented in blender::gpu::GLTexture.
|
inline |
Definition at line 222 of file gpu_texture_private.hh.
References type_.
| void blender::gpu::Texture::update | ( | eGPUDataFormat | format, |
| const void * | data | ||
| ) |
Definition at line 166 of file gpu_texture.cc.
References data, mip_size_get(), and update_sub().
|
pure virtual |
Implemented in blender::gpu::GLTexture.
Referenced by update().
|
inline |
Definition at line 136 of file gpu_texture_private.hh.
References w_.
|
protected |
Definition at line 87 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::copy_to(), depth_get(), init_1D(), init_2D(), init_3D(), init_buffer(), init_cubemap(), layer_count(), mip_depth_get(), and mip_size_get().
|
protected |
Definition at line 106 of file gpu_texture_private.hh.
Referenced by attach_to(), blender::gpu::GLTexture::check_feedback_loop(), detach_from(), Texture(), and ~Texture().
|
protected |
Frame-buffer references to update on deletion.
Definition at line 105 of file gpu_texture_private.hh.
Referenced by attach_to(), blender::gpu::GLTexture::check_feedback_loop(), detach_from(), and ~Texture().
|
protected |
Internal data format.
Definition at line 89 of file gpu_texture_private.hh.
Referenced by attachment_type(), blender::gpu::GLTexture::clear(), blender::gpu::GLTexture::copy_to(), format_get(), init_1D(), init_2D(), init_3D(), init_buffer(), init_cubemap(), blender::gpu::GLTexture::init_internal(), blender::gpu::GLTexture::read(), and blender::gpu::GLTexture::update_sub().
|
protected |
Format characteristics.
Definition at line 91 of file gpu_texture_private.hh.
Referenced by format_flag_get(), blender::gpu::GLTexture::generate_mipmap(), init_1D(), init_2D(), init_3D(), init_buffer(), init_cubemap(), blender::gpu::GLTexture::read(), and blender::gpu::GLTexture::update_sub().
|
protected |
Definition at line 87 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::copy_to(), height_get(), init_1D(), init_2D(), init_3D(), init_buffer(), init_cubemap(), layer_count(), mip_height_get(), and mip_size_get().
|
protected |
Definition at line 99 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::check_feedback_loop(), and blender::gpu::GLTexture::mip_range_set().
|
protected |
For error checking
Definition at line 99 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::check_feedback_loop(), and blender::gpu::GLTexture::mip_range_set().
|
protected |
Number of mipmaps this texture has (Max miplvl).
Definition at line 97 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::mip_range_set(), blender::gpu::GLTexture::read(), and blender::gpu::GLTexture::update_sub().
|
protected |
For debugging
Definition at line 102 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::check_feedback_loop(), blender::gpu::GLTexture::init_internal(), and Texture().
| int blender::gpu::Texture::refcount = 1 |
Reference counter.
Definition at line 80 of file gpu_texture_private.hh.
| eGPUSamplerState blender::gpu::Texture::sampler_state = GPU_SAMPLER_DEFAULT |
Internal Sampler state.
Definition at line 78 of file gpu_texture_private.hh.
Referenced by init_1D(), init_2D(), init_3D(), and init_cubemap().
| int blender::gpu::Texture::src_h = 0 |
Definition at line 82 of file gpu_texture_private.hh.
| int blender::gpu::Texture::src_w = 0 |
Width & Height (of source data), optional.
Definition at line 82 of file gpu_texture_private.hh.
|
protected |
Texture type.
Definition at line 93 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::copy_to(), dimensions_count(), init_1D(), init_2D(), init_3D(), init_buffer(), init_cubemap(), blender::gpu::GLTexture::init_internal(), layer_count(), mip_depth_get(), mip_height_get(), mip_size_get(), blender::gpu::GLTexture::read(), type_get(), and blender::gpu::GLTexture::update_sub().
|
protected |
Width & Height & Depth. For cube-map arrays, d is number of face-layers.
Definition at line 87 of file gpu_texture_private.hh.
Referenced by blender::gpu::GLTexture::copy_to(), init_1D(), init_2D(), init_3D(), init_buffer(), init_cubemap(), mip_size_get(), mip_width_get(), and width_get().