Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TransientResourceCache Class Reference

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>

Inheritance diagram for ph::TransientResourceCache:
ph::CookedResourceCollectionBase ph::INoCopyAndMove

Public Member Functions

std::string getStats () const override
 
template<typename... DeducedArgs>
TransientVisualElementmakeVisualElement (const SdlResourceId id, DeducedArgs &&... args)
 
const TransientVisualElementgetVisualElement (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)
 

Detailed Description

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.

Member Function Documentation

◆ getStats()

std::string ph::TransientResourceCache::getStats ( ) const
overridevirtual

◆ getVisualElement()

const TransientVisualElement * ph::TransientResourceCache::getVisualElement ( const SdlResourceId id) const

◆ makeVisualElement()

template<typename... DeducedArgs>
TransientVisualElement * ph::TransientResourceCache::makeVisualElement ( const SdlResourceId id,
DeducedArgs &&... args )
inline

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