ezEngine  Milestone 7
ShaderResource.h
1 #pragma once
2 
3 #include <RendererCore/Basics.h>
4 #include <Core/ResourceManager/Resource.h>
5 #include <Core/ResourceManager/ResourceTypeLoader.h>
6 #include <RendererCore/Shader/ShaderPermutationResource.h>
7 
9 
11 {
12 };
13 
14 class EZ_RENDERERCORE_DLL ezShaderResource : public ezResource<ezShaderResource, ezShaderResourceDescriptor>
15 {
17 
18 public:
20 
21  bool IsShaderValid() const { return m_bShaderResourceIsValid; }
22 
23  const ezString& GetUsedPermutationVars() const { return m_PermutationVarsUsed; }
24 
25 private:
26  virtual ezResourceLoadDesc UnloadData(Unload WhatToUnload) override;
27  virtual ezResourceLoadDesc UpdateContent(ezStreamReaderBase* Stream) override;
28  virtual void UpdateMemoryUsage(MemoryUsage& out_NewMemoryUsage) override;
29 
30 private:
31  ezString m_PermutationVarsUsed;
32  bool m_bShaderResourceIsValid;
33 };
34