Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Core::Texture2DStore Class Reference

#include <AssetRegistry.h>

Collaboration diagram for Engine::Core::Texture2DStore:

Classes

struct  Record

Public Member Functions

 Texture2DStore (AssetManager *assetManager=nullptr)
void setAssetManager (AssetManager *assetManager)
Assets::Texture2DHandle load (const std::filesystem::path &source, Assets::TextureType usage=Assets::TextureType::BaseColor)
bool isValid (Assets::Texture2DHandle handle) const
const std::filesystem::path * sourcePath (Assets::Texture2DHandle handle) const
Assets::TextureHandle legacyHandle (Assets::Texture2DHandle handle) const
Assets::TextureType usage (Assets::Texture2DHandle handle) const

Static Private Member Functions

static std::string keyFor (const std::filesystem::path &source)

Private Attributes

AssetManagerassetManager_ = nullptr
std::vector< Recordrecords_
std::unordered_map< std::string, uint32_t > sourceToIndex_

Detailed Description

Definition at line 100 of file AssetRegistry.h.

Constructor & Destructor Documentation

◆ Texture2DStore()

Engine::Core::Texture2DStore::Texture2DStore ( AssetManager * assetManager = nullptr)
explicit

Member Function Documentation

◆ isValid()

bool Engine::Core::Texture2DStore::isValid ( Assets::Texture2DHandle handle) const
nodiscard

◆ keyFor()

std::string Engine::Core::Texture2DStore::keyFor ( const std::filesystem::path & source)
staticnodiscardprivate

◆ legacyHandle()

Assets::TextureHandle Engine::Core::Texture2DStore::legacyHandle ( Assets::Texture2DHandle handle) const
nodiscard

◆ load()

Assets::Texture2DHandle Engine::Core::Texture2DStore::load ( const std::filesystem::path & source,
Assets::TextureType usage = Assets::TextureType::BaseColor )
nodiscard

References Engine::Assets::BaseColor, and usage().

Here is the call graph for this function:

◆ setAssetManager()

void Engine::Core::Texture2DStore::setAssetManager ( AssetManager * assetManager)

◆ sourcePath()

const std::filesystem::path * Engine::Core::Texture2DStore::sourcePath ( Assets::Texture2DHandle handle) const
nodiscard

◆ usage()

Assets::TextureType Engine::Core::Texture2DStore::usage ( Assets::Texture2DHandle handle) const
nodiscard

Referenced by load().

Here is the caller graph for this function:

Member Data Documentation

◆ assetManager_

AssetManager* Engine::Core::Texture2DStore::assetManager_ = nullptr
private

Definition at line 129 of file AssetRegistry.h.

◆ records_

std::vector<Record> Engine::Core::Texture2DStore::records_
private

Definition at line 130 of file AssetRegistry.h.

◆ sourceToIndex_

std::unordered_map<std::string, uint32_t> Engine::Core::Texture2DStore::sourceToIndex_
private

Definition at line 131 of file AssetRegistry.h.


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