|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Type-safe texture handle wrapper providing compile-time type safety. More...
#include <TextureHandle.h>
Public Member Functions | |
| TypedTextureHandle ()=default | |
| Creates an invalid typed texture handle. | |
| TypedTextureHandle (TextureHandle base) | |
| Construct from a base TextureHandle. | |
| bool | isValid () const |
| Check if this handle points to a valid registry entry. | |
| TextureHandle | getBase () const |
| Get the underlying base handle. | |
| uint32_t | getId () const |
| Get the registry ID for this handle. | |
| operator TextureHandle () const | |
| Implicit conversion to base handle for storage/runtime use. | |
| bool | operator== (const TypedTextureHandle &other) const |
| Compares the underlying base handles. | |
| bool | operator!= (const TypedTextureHandle &other) const |
| Returns true when the underlying base handles differ. | |
Static Public Member Functions | |
| static constexpr TextureType | getType () |
| Get the texture type (compile-time constant) | |
Private Attributes | |
| TextureHandle | base_ |
Type-safe texture handle wrapper providing compile-time type safety.
This template class wraps TextureHandle and provides compile-time type checking. You cannot accidentally assign a normal map handle to an albedo slot - the compiler will reject it.
Example:
| Type | The TextureType this handle represents |
Definition at line 84 of file TextureHandle.h.
|
default |
Creates an invalid typed texture handle.
Referenced by operator!=(), and operator==().
|
inlineexplicit |
Construct from a base TextureHandle.
Asserts that the base handle's type matches the template type.
Definition at line 96 of file TextureHandle.h.
References base_, Engine::Assets::TextureHandle::getType(), and Engine::Assets::TextureHandle::isValid().
|
inlinenodiscard |
|
inlinenodiscard |
Get the registry ID for this handle.
Definition at line 114 of file TextureHandle.h.
References base_.
|
inlinestaticnodiscardconstexpr |
Get the texture type (compile-time constant)
Definition at line 119 of file TextureHandle.h.
|
inlinenodiscard |
Check if this handle points to a valid registry entry.
Definition at line 104 of file TextureHandle.h.
References base_.
|
inline |
Implicit conversion to base handle for storage/runtime use.
Definition at line 124 of file TextureHandle.h.
References base_.
|
inline |
Returns true when the underlying base handles differ.
Definition at line 136 of file TextureHandle.h.
References TypedTextureHandle().
|
inline |
Compares the underlying base handles.
Definition at line 129 of file TextureHandle.h.
References base_, and TypedTextureHandle().
|
private |
Definition at line 141 of file TextureHandle.h.
Referenced by getBase(), getId(), isValid(), operator TextureHandle(), operator==(), and TypedTextureHandle().