|
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 17 of file TextureHandle.h.
|
default |
|
inline |
Definition at line 22 of file TextureHandle.h.
|
inlinenodiscard |
Get the registry ID for this handle.
Definition at line 32 of file TextureHandle.h.
References id_.
Referenced by EngineCore::TextureHandleRegistry::getPathForHandle(), EngineCore::TextureHandleRegistry::getTextureType(), and EngineCore::TextureHandleRegistry::resolveDescriptorIndex().
|
inlinenodiscard |
Get the texture type for this handle.
Definition at line 37 of file TextureHandle.h.
References type_.
Referenced by EngineCore::TypedTextureHandle< TextureType::BaseColor >::TypedTextureHandle().
|
inlinenodiscard |
Check if this handle points to a valid registry entry.
Definition at line 27 of file TextureHandle.h.
References id_, and INVALID_ID.
Referenced by EngineCore::TextureHandleRegistry::getPathForHandle(), EngineCore::TextureHandleRegistry::getTextureType(), EngineCore::TextureHandleRegistry::resolveDescriptorIndex(), and EngineCore::TypedTextureHandle< TextureType::BaseColor >::TypedTextureHandle().
|
inline |
Definition at line 43 of file TextureHandle.h.
References TextureHandle().
|
inline |
Definition at line 39 of file TextureHandle.h.
References id_, TextureHandle(), and type_.
|
private |
Definition at line 48 of file TextureHandle.h.
Referenced by getId(), isValid(), operator==(), and TextureHandle().
|
staticconstexpr |
Definition at line 19 of file TextureHandle.h.
Referenced by EngineCore::TextureHandleRegistry::getOrCreateHandleImpl(), isValid(), EngineCore::TextureHandleRegistry::onTextureUnloaded(), and EngineCore::TextureHandleRegistry::resolveDescriptorIndex().
|
private |
Definition at line 49 of file TextureHandle.h.
Referenced by getType(), operator==(), and TextureHandle().