2#include "TextureType.h"
38 [[nodiscard]] uint32_t
getId()
const {
return id_; }
56 return !(*
this == other);
83template <TextureType Type>
98 "TextureHandle type mismatch in TypedTextureHandle construction");
114 [[nodiscard]] uint32_t
getId()
const {
return base_.getId(); }
137 return !(*
this == other);
Type-erased texture handle for runtime storage.
uint32_t getId() const
Get the registry ID for this handle.
bool operator!=(const TextureHandle &other) const
Returns true when registry ID or texture type differs.
bool operator==(const TextureHandle &other) const
Compares registry ID and texture type.
static constexpr uint32_t INVALID_ID
Sentinel ID for an invalid handle.
TextureHandle(uint32_t id, TextureType type)
Creates a texture handle from a registry ID and semantic type.
bool isValid() const
Check if this handle points to a valid registry entry.
TextureHandle()=default
Creates an invalid texture handle.
TextureType getType() const
Get the texture type for this handle.
bool operator==(const TypedTextureHandle &other) const
Compares the underlying base handles.
TypedTextureHandle()=default
Creates an invalid typed texture handle.
uint32_t getId() const
Get the registry ID for this handle.
TextureHandle getBase() const
Get the underlying base handle.
bool isValid() const
Check if this handle points to a valid registry entry.
static constexpr TextureType getType()
Get the texture type (compile-time constant)
TypedTextureHandle(TextureHandle base)
Construct from a base TextureHandle.
bool operator!=(const TypedTextureHandle &other) const
Returns true when the underlying base handles differ.
TextureType
Represents the semantic type of a texture, determining its Vulkan format.
@ Unknown
Fallback type, uses SRGB as default.