|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
Type-erased texture handle for runtime storage. More...
#include <TextureHandle.h>
Public Member Functions | |
| TextureHandle ()=default | |
| TextureHandle (uint32_t id, TextureType type) | |
| bool | isValid () const |
| Check if this handle points to a valid registry entry. | |
| uint32_t | getId () const |
| Get the registry ID for this handle. | |
| TextureType | getType () const |
| Get the texture type for this handle. | |
| bool | operator== (const TextureHandle &other) const |
| bool | operator!= (const TextureHandle &other) const |
Static Public Attributes | |
| static constexpr uint32_t | INVALID_ID = 0xFFFFFFFF |
Private Attributes | |
| uint32_t | id_ = INVALID_ID |
| TextureType | type_ = TextureType::Unknown |
Type-erased texture handle for runtime storage.
This is the base handle class that can be stored in containers and used for runtime polymorphism. It contains both the registry ID and the texture type.
Definition at line 14 of file TextureHandle.h.
|
default |
|
inline |
Definition at line 19 of file TextureHandle.h.
|
inlinenodiscard |
|
inlinenodiscard |
Get the texture type for this handle.
Definition at line 34 of file TextureHandle.h.
References type_.
Referenced by Engine::Assets::TypedTextureHandle< TextureType::BaseColor >::TypedTextureHandle().
|
inlinenodiscard |
Check if this handle points to a valid registry entry.
Definition at line 24 of file TextureHandle.h.
References id_, and INVALID_ID.
Referenced by Engine::Assets::TypedTextureHandle< TextureType::BaseColor >::TypedTextureHandle().
|
inline |
Definition at line 40 of file TextureHandle.h.
References TextureHandle().
|
inline |
Definition at line 36 of file TextureHandle.h.
References id_, TextureHandle(), and type_.
|
private |
Definition at line 45 of file TextureHandle.h.
Referenced by getId(), isValid(), operator==(), and TextureHandle().
|
staticconstexpr |
Definition at line 16 of file TextureHandle.h.
Referenced by isValid().
|
private |
Definition at line 46 of file TextureHandle.h.
Referenced by getType(), operator==(), and TextureHandle().