8#include <unordered_map>
9#include <unordered_set>
12#include "shader/general/resource/binding/cpuwrite/ShaderCpuWriteResourceBinding.h"
13#include "shader/general/resource/binding/cpuwrite/ShaderCpuWriteResourceBindingUniquePtr.h"
14#include "render/general/resource/frame/FrameResourceManager.h"
37 std::unordered_map<ShaderCpuWriteResourceBinding*, std::unique_ptr<ShaderCpuWriteResourceBinding>>
42 std::unordered_set<ShaderCpuWriteResourceBinding*>,
73 const std::string& sShaderResourceName,
74 const std::string& sResourceAdditionalInfo,
75 size_t iResourceDataSizeInBytes,
76 const std::unordered_set<Pipeline*>& pipelinesToUse,
77 const std::function<
void*()>& onStartedUpdatingResource,
78 const std::function<
void()>& onFinishedUpdatingResource);
102 std::pair<std::recursive_mutex, Resources>*
getResources();
119 std::variant<ShaderCpuWriteResourceBindingUniquePtr, Error>
static constexpr unsigned int getFrameResourceCount()
Definition: FrameResourceManager.h:74
Definition: Renderer.h:43
Definition: ShaderCpuWriteResourceBindingManager.h:21
void updateResources(size_t iCurrentFrameResourceIndex)
Definition: ShaderCpuWriteResourceBindingManager.cpp:54
void destroyResource(ShaderCpuWriteResourceBinding *pResourceToDestroy)
Definition: ShaderCpuWriteResourceBindingManager.cpp:99
void markResourceAsNeedsUpdate(ShaderCpuWriteResourceBinding *pResourceToDestroy)
Definition: ShaderCpuWriteResourceBindingManager.cpp:75
Renderer * pRenderer
Definition: ShaderCpuWriteResourceBindingManager.h:131
std::pair< std::recursive_mutex, Resources > mtxShaderCpuWriteResources
Definition: ShaderCpuWriteResourceBindingManager.h:134
~ShaderCpuWriteResourceBindingManager()
Definition: ShaderCpuWriteResourceBindingManager.cpp:128
std::variant< ShaderCpuWriteResourceBindingUniquePtr, Error > createShaderCpuWriteResource(const std::string &sShaderResourceName, const std::string &sResourceAdditionalInfo, size_t iResourceDataSizeInBytes, const std::unordered_set< Pipeline * > &pipelinesToUse, const std::function< void *()> &onStartedUpdatingResource, const std::function< void()> &onFinishedUpdatingResource)
Definition: ShaderCpuWriteResourceBindingManager.cpp:11
std::pair< std::recursive_mutex, Resources > * getResources()
Definition: ShaderCpuWriteResourceBindingManager.cpp:120
std::variant< ShaderCpuWriteResourceBindingUniquePtr, Error > handleResourceCreation(std::variant< std::unique_ptr< ShaderCpuWriteResourceBinding >, Error > result)
Definition: ShaderCpuWriteResourceBindingManager.cpp:29
Definition: ShaderCpuWriteResourceBindingUniquePtr.h:14
Definition: ShaderCpuWriteResourceBinding.h:25
Definition: ShaderCpuWriteResourceBindingManager.h:30
std::array< std::unordered_set< ShaderCpuWriteResourceBinding * >, FrameResourceManager::getFrameResourceCount()> vToBeUpdated
Definition: ShaderCpuWriteResourceBindingManager.h:44
std::unordered_map< ShaderCpuWriteResourceBinding *, std::unique_ptr< ShaderCpuWriteResourceBinding > > all
Definition: ShaderCpuWriteResourceBindingManager.h:38