10 SDL_GPUDevice *m_device =
nullptr;
11 SDL_GPUTexture *m_texture =
nullptr;
12 SDL_GPUTextureCreateInfo m_description;
17 const char *
name =
nullptr);
24 operator SDL_GPUTexture *()
const noexcept {
return m_texture; }
27 return m_texture == other.m_texture;
31 SDL_GPUTextureType
type()
const {
return m_description.type; }
32 SDL_GPUTextureFormat
format()
const {
return m_description.format; }
33 SDL_GPUTextureUsageFlags
usage()
const {
return m_description.usage; }
34 Uint32
width()
const {
return m_description.width; }
35 Uint32
height()
const {
return m_description.height; }
36 Uint32
depth()
const {
return m_description.layer_count_or_depth; }
37 Uint32
layerCount()
const {
return m_description.layer_count_or_depth; }
38 SDL_GPUSampleCount
sampleCount()
const {
return m_description.sample_count; }
39 std::string_view
name()
const {
40 return SDL_GetStringProperty(
41 m_description.props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING,
"(null)");
44 SDL_GPUBlitRegion
blitRegion(Uint32 offset_x, Uint32 y_offset,
45 Uint32 layer_or_depth_plane = 0)
const;
49 SDL_GPUDevice *
device()
const {
return m_device; }
SDL_GPUDevice * device() const
Definition Texture.h:49
SDL_GPUTextureFormat format() const
Definition Texture.h:32
bool operator==(const Texture &other) const noexcept
Definition Texture.h:26
Texture(Texture &&other) noexcept
SDL_GPUBlitRegion blitRegion(Uint32 offset_x, Uint32 y_offset, Uint32 layer_or_depth_plane=0) const
Texture(const Texture &)=delete
SDL_GPUTextureType type() const
Definition Texture.h:31
std::string_view name() const
Definition Texture.h:39
Texture & operator=(const Texture &)=delete
Uint32 textureSize() const
Texture(const Device &device, SDL_GPUTextureCreateInfo texture_desc, const char *name=nullptr)
SDL_GPUTextureUsageFlags usage() const
Definition Texture.h:33
Uint32 layerCount() const
Definition Texture.h:37
Texture & operator=(Texture &&other) noexcept
const auto & description() const
Definition Texture.h:30
SDL_GPUSampleCount sampleCount() const
Definition Texture.h:38