Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::TextureHandle Class Reference

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

Detailed Description

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.

Author
Konstantin Passig
Date
2026-01-22

Definition at line 17 of file TextureHandle.h.

Constructor & Destructor Documentation

◆ TextureHandle() [1/2]

EngineCore::TextureHandle::TextureHandle ( )
default

Referenced by operator!=(), and operator==().

Here is the caller graph for this function:

◆ TextureHandle() [2/2]

EngineCore::TextureHandle::TextureHandle ( uint32_t id,
TextureType type )
inline

Definition at line 22 of file TextureHandle.h.

References id_, and type_.

Member Function Documentation

◆ getId()

uint32_t EngineCore::TextureHandle::getId ( ) const
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().

Here is the caller graph for this function:

◆ getType()

TextureType EngineCore::TextureHandle::getType ( ) const
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().

Here is the caller graph for this function:

◆ isValid()

bool EngineCore::TextureHandle::isValid ( ) const
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().

Here is the caller graph for this function:

◆ operator!=()

bool EngineCore::TextureHandle::operator!= ( const TextureHandle & other) const
inline

Definition at line 43 of file TextureHandle.h.

References TextureHandle().

Here is the call graph for this function:

◆ operator==()

bool EngineCore::TextureHandle::operator== ( const TextureHandle & other) const
inline

Definition at line 39 of file TextureHandle.h.

References id_, TextureHandle(), and type_.

Here is the call graph for this function:

Member Data Documentation

◆ id_

uint32_t EngineCore::TextureHandle::id_ = INVALID_ID
private

Definition at line 48 of file TextureHandle.h.

Referenced by getId(), isValid(), operator==(), and TextureHandle().

◆ INVALID_ID

uint32_t EngineCore::TextureHandle::INVALID_ID = 0xFFFFFFFF
staticconstexpr

◆ type_

TextureType EngineCore::TextureHandle::type_ = TextureType::Unknown
private

Definition at line 49 of file TextureHandle.h.

Referenced by getType(), operator==(), and TextureHandle().


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Texture/TextureHandle.h