11#include "misc/Error.h"
12#include "render/general/resource/UploadBuffer.h"
13#include "material/TextureManager.h"
14#include "render/general/resource/shadow/ShadowMapManager.h"
19 class DynamicCpuWriteShaderResourceArrayManager;
22 enum class ResourceUsageType {
30 enum class ShaderReadWriteTextureResourceFormat {
81 const std::string& sResourceName,
const std::filesystem::path& pathToTextureFile) = 0;
112 const std::string& sResourceName,
113 size_t iElementSizeInBytes,
114 size_t iElementCount,
115 std::optional<bool> isUsedInShadersAsArrayResource) = 0;
143 const std::string& sResourceName,
144 const void* pBufferData,
145 size_t iElementSizeInBytes,
146 size_t iElementCount,
147 ResourceUsageType usage,
148 bool bIsShaderReadWriteResource) = 0;
166 const std::string& sResourceName,
167 size_t iElementSizeInBytes,
168 size_t iElementCount,
169 ResourceUsageType usage,
170 bool bIsShaderReadWriteResource) = 0;
183 const std::string& sResourceName,
185 unsigned int iHeight,
186 ShaderReadWriteTextureResourceFormat format) = 0;
257 static std::variant<std::unique_ptr<GpuResourceManager>,
Error>
272 const std::string& sResourceName,
unsigned int iTextureSize,
bool bPointLightColorCubemap) = 0;
Definition: DynamicCpuWriteShaderResourceArrayManager.h:27
Definition: GpuResourceManager.h:43
virtual std::variant< std::unique_ptr< GpuResource >, Error > createResourceWithData(const std::string &sResourceName, const void *pBufferData, size_t iElementSizeInBytes, size_t iElementCount, ResourceUsageType usage, bool bIsShaderReadWriteResource)=0
static std::variant< std::unique_ptr< GpuResourceManager >, Error > createRendererSpecificManager(Renderer *pRenderer)
Definition: GpuResourceManager.cpp:27
Renderer *const pRenderer
Definition: GpuResourceManager.h:300
virtual size_t getUsedVideoMemoryInMb() const =0
std::unique_ptr< TextureManager > pTextureManager
Definition: GpuResourceManager.h:288
virtual std::variant< std::unique_ptr< UploadBuffer >, Error > createResourceWithCpuWriteAccess(const std::string &sResourceName, size_t iElementSizeInBytes, size_t iElementCount, std::optional< bool > isUsedInShadersAsArrayResource)=0
Renderer * getRenderer() const
Definition: GpuResourceManager.cpp:13
ShadowMapManager * getShadowMapManager() const
Definition: GpuResourceManager.cpp:17
TextureManager * getTextureManager() const
Definition: GpuResourceManager.cpp:15
virtual size_t getTotalVideoMemoryInMb() const =0
std::atomic< size_t > iAliveResourceCount
Definition: GpuResourceManager.h:297
std::unique_ptr< DynamicCpuWriteShaderResourceArrayManager > pDynamicCpuWriteShaderResourceArrayManager
Definition: GpuResourceManager.h:294
static std::variant< std::unique_ptr< GpuResourceManager >, Error > create(Renderer *pRenderer)
Definition: GpuResourceManager.cpp:57
DynamicCpuWriteShaderResourceArrayManager * getDynamicCpuWriteShaderResourceArrayManager() const
Definition: GpuResourceManager.cpp:20
virtual std::variant< std::unique_ptr< GpuResource >, Error > createShadowMapTexture(const std::string &sResourceName, unsigned int iTextureSize, bool bPointLightColorCubemap)=0
virtual std::variant< std::unique_ptr< GpuResource >, Error > loadTextureFromDisk(const std::string &sResourceName, const std::filesystem::path &pathToTextureFile)=0
std::unique_ptr< ShadowMapManager > pShadowMapManager
Definition: GpuResourceManager.h:291
size_t getTotalAliveResourceCount()
Definition: GpuResourceManager.cpp:24
virtual std::variant< std::unique_ptr< GpuResource >, Error > createShaderReadWriteTextureResource(const std::string &sResourceName, unsigned int iWidth, unsigned int iHeight, ShaderReadWriteTextureResourceFormat format)=0
virtual std::string getCurrentStateInfo()=0
virtual std::variant< std::unique_ptr< GpuResource >, Error > createResource(const std::string &sResourceName, size_t iElementSizeInBytes, size_t iElementCount, ResourceUsageType usage, bool bIsShaderReadWriteResource)=0
void resetManagers()
Definition: GpuResourceManager.cpp:95
Definition: GpuResource.h:16
Definition: Renderer.h:43
Definition: ShadowMapManager.h:29
Definition: TextureManager.h:20