Photon Engine 2.0.0-beta
A physically based renderer.
|
Provides thread-safe cooked data creation and storage. Similar to TransientVisualElement
, this cache will be cleared before rendering starts. All methods are thread-safe to call, however manipulating the created data is not thread-safe unless stated explicitly.
More...
#include <TransientResourceCache.h>
Public Member Functions | |
std::string | getStats () const override |
template<typename... DeducedArgs> | |
TransientVisualElement * | makeVisualElement (const SdlResourceId id, DeducedArgs &&... args) |
const TransientVisualElement * | getVisualElement (const SdlResourceId id) const |
Public Member Functions inherited from ph::CookedResourceCollectionBase | |
virtual | ~CookedResourceCollectionBase ()=default |
Additional Inherited Members | |
Protected Types inherited from ph::CookedResourceCollectionBase | |
template<typename CookedType > | |
using | TSdlResourceIdMap = std::unordered_map<SdlResourceId, std::unique_ptr<CookedType>> |
Static Protected Member Functions inherited from ph::CookedResourceCollectionBase | |
template<typename DerivedType , typename BaseType , typename... DeducedArgs> | |
static DerivedType * | makeCookedResource (TSynchronized< TUniquePtrVector< BaseType > > &syncedResources, DeducedArgs &&... args) |
template<typename CookedType , typename... DeducedArgs> | |
static CookedType * | makeCookedResourceWithID (TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id, DeducedArgs &&... args) |
template<typename CookedType , typename... DeducedArgs> | |
static const CookedType * | getCookedResourceByID (const TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id) |
Provides thread-safe cooked data creation and storage. Similar to TransientVisualElement
, this cache will be cleared before rendering starts. All methods are thread-safe to call, however manipulating the created data is not thread-safe unless stated explicitly.
|
overridevirtual |
Implements ph::CookedResourceCollectionBase.
const TransientVisualElement * ph::TransientResourceCache::getVisualElement | ( | const SdlResourceId | id | ) | const |
|
inline |