#include <Texture.hpp>
◆ Texture() [1/7]
| Graphic::Resource::Texture::Texture |
( |
std::string_view | name, |
|
|
wgpu::Texture | texture, |
|
|
bool | ownsResources = true ) |
|
inline |
◆ Texture() [2/7]
| Graphic::Resource::Texture::Texture |
( |
const Context & | context, |
|
|
const wgpu::TextureDescriptor & | descriptor ) |
|
inline |
◆ Texture() [3/7]
| Graphic::Resource::Texture::Texture |
( |
const Context & | context, |
|
|
std::string_view | name, |
|
|
const Image & | image ) |
|
inline |
◆ Texture() [4/7]
| Graphic::Resource::Texture::Texture |
( |
const Context & | context, |
|
|
std::string_view | name, |
|
|
const glm::uvec2 & | size, |
|
|
const std::function< glm::u8vec4(glm::uvec2 pos)> & | callback ) |
|
inline |
◆ ~Texture()
| Graphic::Resource::Texture::~Texture |
( |
| ) |
|
|
inline |
◆ Texture() [5/7]
| Graphic::Resource::Texture::Texture |
( |
const Texture & | | ) |
|
|
delete |
◆ Texture() [6/7]
| Graphic::Resource::Texture::Texture |
( |
Texture && | other | ) |
|
|
inlinenoexcept |
◆ Texture() [7/7]
| Graphic::Resource::Texture::Texture |
( |
void | | ) |
|
|
privatedefault |
◆ _BuildDescriptor()
| wgpu::TextureDescriptor Graphic::Resource::Texture::_BuildDescriptor |
( |
std::string_view | name, |
|
|
const Image & | image ) |
|
inlinestaticprivate |
◆ _GetBytesPerPixel()
| uint32_t Graphic::Resource::Texture::_GetBytesPerPixel |
( |
| ) |
const |
|
inlineprivate |
◆ CreateView()
| wgpu::TextureView Graphic::Resource::Texture::CreateView |
( |
const wgpu::TextureViewDescriptor & | descriptor | ) |
const |
|
inline |
◆ GetDefaultView()
| wgpu::TextureView Graphic::Resource::Texture::GetDefaultView |
( |
| ) |
const |
|
inline |
◆ GetSize()
| glm::uvec2 Graphic::Resource::Texture::GetSize |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ OwnsResources()
| bool Graphic::Resource::Texture::OwnsResources |
( |
| ) |
const |
|
inline |
◆ ReleaseOwnership()
| void Graphic::Resource::Texture::ReleaseOwnership |
( |
| ) |
|
|
inline |
◆ RetrieveImage()
| Image Graphic::Resource::Texture::RetrieveImage |
( |
const Context & | context | ) |
const |
|
inline |
Reads back the GPU texture and returns it as an Image.
Copies the texture to a CPU-readable buffer, converts the source texel format into 4-channel RGBA byte pixels, and returns an Image populated with those pixels. Depth formats are mapped to grayscale RGBA (depth -> luminance, alpha = 255).
- Returns
- Image The retrieved image with width and height matching the texture and 4 channels (RGBA).
◆ TakeOwnership()
| void Graphic::Resource::Texture::TakeOwnership |
( |
| ) |
|
|
inline |
◆ Write()
| void Graphic::Resource::Texture::Write |
( |
const Context & | context, |
|
|
const Image & | image ) |
|
inline |
◆ _defaultView
| wgpu::TextureView Graphic::Resource::Texture::_defaultView |
|
private |
◆ _name
| std::string Graphic::Resource::Texture::_name |
|
private |
◆ _ownsResources
| bool Graphic::Resource::Texture::_ownsResources = true |
|
private |
◆ _webgpuTexture
| wgpu::Texture Graphic::Resource::Texture::_webgpuTexture |
|
private |
The documentation for this class was generated from the following file: