|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Type-erased texture handle for runtime storage. More...
#include <TextureHandle.h>
Public Member Functions | |
| TextureHandle ()=default | |
| Creates an invalid texture 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. | |
| 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 |
| Compares registry ID and texture type. | |
| bool | operator!= (const TextureHandle &other) const |
| Returns true when registry ID or texture type differs. | |
Static Public Attributes | |
| static constexpr uint32_t | INVALID_ID = 0xFFFFFFFF |
| Sentinel ID for an invalid handle. | |
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 |
Creates an invalid texture handle.
Referenced by operator!=(), and operator==().
|
inline |
Creates a texture handle from a registry ID and semantic type.
| id | Registry entry ID. |
| type | Semantic texture type. |
Definition at line 28 of file TextureHandle.h.
|
inlinenodiscard |
|
inlinenodiscard |
Get the texture type for this handle.
Definition at line 43 of file TextureHandle.h.
References type_.
Referenced by Engine::Assets::TypedTextureHandle< Type >::TypedTextureHandle().
|
inlinenodiscard |
Check if this handle points to a valid registry entry.
Definition at line 33 of file TextureHandle.h.
References id_, and INVALID_ID.
Referenced by Engine::Assets::TypedTextureHandle< Type >::TypedTextureHandle().
|
inline |
Returns true when registry ID or texture type differs.
Definition at line 55 of file TextureHandle.h.
References TextureHandle().
|
inline |
Compares registry ID and texture type.
Definition at line 48 of file TextureHandle.h.
References id_, TextureHandle(), and type_.
|
private |
Definition at line 60 of file TextureHandle.h.
Referenced by getId(), isValid(), operator==(), and TextureHandle().
|
staticconstexpr |
Sentinel ID for an invalid handle.
Definition at line 16 of file TextureHandle.h.
Referenced by isValid().
|
private |
Definition at line 61 of file TextureHandle.h.
Referenced by getType(), operator==(), and TextureHandle().