HatchitResource
ht_material_resource.h
1 
15 #pragma once
16 
17 #include <ht_resource.h>
18 #include <ht_shadervariable.h>
19 #include <ht_pipeline_resource.h>
20 #include <ht_renderpass_resource.h>
21 #include <ht_texture_resource.h>
22 
23 namespace Hatchit
24 {
25  namespace Resource
26  {
27  class HT_API Material : public FileResource<Material>
28  {
29  public:
30  struct TexturePath
31  {
32  std::string path;
33  uint32_t set;
34  uint32_t binding;
35  };
36 
38  {
39  std::vector<ShaderVariable*> shaderVariables;
40  uint32_t set;
41  uint32_t binding;
42  };
43 
44  Material(Core::Guid ID);
45  virtual ~Material() = default;
46 
47  //Required function for all RefCounted classes
48  bool Initialize(const std::string& fileName);
49 
50  const std::string& GetPipelinePath() const;
51  const std::vector<std::string>& GetRenderPassPaths() const;
52  std::vector<ShaderVariableBinding> GetShaderVariables() const;
53  std::vector<TexturePath> GetTexturePaths() const;
54 
55  private:
56  std::string m_pipelinePath;
57  std::vector<std::string> m_renderPassPaths;
58  std::vector<ShaderVariableBinding> m_shaderVariables;
59  std::vector<TexturePath> m_texturePaths;
60  };
61 
62  using MaterialHandle = Core::Handle<const Material>;
63  }
64 }
Definition: ht_resource.h:35
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_assimp.h:31
Definition: ht_material_resource.h:37
Definition: ht_material_resource.h:30
Definition: ht_material_resource.h:27