Loading...
Searching...
No Matches
hellfire::TextureCache Class Reference

#include <Texture.h>

Collaboration diagram for hellfire::TextureCache:

Static Public Member Functions

static std::shared_ptr< Textureload (const std::string &path, TextureType type=TextureType::DIFFUSE, const TextureSettings &settings=TextureSettings{})
 
static void clear_cache ()
 
static size_t get_cache_size ()
 

Static Private Attributes

static std::unordered_map< std::string, std::weak_ptr< Texture > > cache_
 

Detailed Description

Definition at line 149 of file Texture.h.

Member Function Documentation

◆ clear_cache()

void hellfire::TextureCache::clear_cache ( )
static

Definition at line 284 of file Texture.cpp.

◆ get_cache_size()

size_t hellfire::TextureCache::get_cache_size ( )
static

Definition at line 288 of file Texture.cpp.

◆ load()

std::shared_ptr< Texture > hellfire::TextureCache::load ( const std::string &  path,
TextureType  type = TextureType::DIFFUSE,
const TextureSettings settings = TextureSettings{} 
)
static

Definition at line 261 of file Texture.cpp.

Member Data Documentation

◆ cache_

std::unordered_map< std::string, std::weak_ptr< Texture > > hellfire::TextureCache::cache_
staticprivate

Definition at line 159 of file Texture.h.


The documentation for this class was generated from the following files: