Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TransientResourceCache.h
Go to the documentation of this file.
1#pragma once
2
6#include "Utility/traits.h"
7#include "SDL/SdlResourceId.h"
9
10#include <Common/logging.h>
11
12#include <utility>
13
14namespace ph
15{
16
18
25{
26public:
27 std::string getStats() const override;
28
29 template<typename... DeducedArgs>
30 TransientVisualElement* makeVisualElement(const SdlResourceId id, DeducedArgs&&... args)
31 {
32 return makeCookedResourceWithID(m_idToVisualElement, id, std::forward<DeducedArgs>(args)...);
33 }
34
36
37private:
38 TSynchronized<TSdlResourceIdMap<TransientVisualElement>> m_idToVisualElement;
39};
40
41}// end namespace ph
Provides thread-safe cooked data creation and storage. All methods are thread-safe to call,...
Definition CookedResourceCollectionBase.h:25
static CookedType * makeCookedResourceWithID(TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id, DeducedArgs &&... args)
Definition CookedResourceCollectionBase.h:55
Provides thread-safe cooked data creation and storage. Similar to TransientVisualElement,...
Definition TransientResourceCache.h:25
std::string getStats() const override
Definition TransientResourceCache.cpp:13
TransientVisualElement * makeVisualElement(const SdlResourceId id, DeducedArgs &&... args)
Definition TransientResourceCache.h:30
const TransientVisualElement * getVisualElement(const SdlResourceId id) const
Definition TransientResourceCache.cpp:8
A group of cooked data that represent the visible part of the scene at a specific time....
Definition TransientVisualElement.h:19
The root for all renderer implementations.
Definition EEngineProject.h:6
std::uint64_t SdlResourceId
Definition SdlResourceId.h:8
PH_DEFINE_EXTERNAL_LOG_GROUP(ApiDatabase, Core)