Lugdunum  0.1.0
Material.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <string>
5 
9 
10 namespace lug {
11 namespace Graphics {
12 
13 class Renderer;
14 
15 namespace Builder {
16 
19 
20 public:
21  explicit Material(Renderer& renderer);
22 
23  Material(const Material&) = delete;
24  Material(Material&&) = delete;
25 
26  Material& operator=(const Material&) = delete;
27  Material& operator=(Material&&) = delete;
28 
29  ~Material() = default;
30 
35  void setName(const std::string& name);
36 
37  void setBaseColorFactor(const Math::Vec4f& factor);
38  void setEmissiveFactor(const Math::Vec3f& factor);
39  void setMetallicFactor(float factor);
40  void setRoughnessFactor(float factor);
41 
42  void setBaseColorTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord = 0);
43  void setMetallicRoughnessTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord = 0);
44  void setNormalTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord = 0, float scale = 1.0f);
45  void setOcclusionTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord = 0, float strength = 1.0f);
46  void setEmissiveTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord = 0);
47 
49 
50 protected:
52 
53  std::string _name;
60 };
61 
63 
64 } // Builder
65 } // Graphics
66 } // lug
Render::Material::Constants _constants
Definition: Material.hpp:54
Matrix< 4, 4, T > scale(const Vector< 3, T > &factors)
Definition: Transform.inl:41
#define LUG_GRAPHICS_API
Definition: Export.hpp:11
Render::Material::TextureInfo _baseColorTexture
Definition: Material.hpp:55
Resource::SharedPtr< lug::Graphics::Render::Material > build(const ::lug::Graphics::Builder::Material &builder)
Definition: Material.cpp:14
Render::Material::TextureInfo _metallicRoughnessTexture
Definition: Material.hpp:56
Render::Material::TextureInfo _normalTexture
Definition: Material.hpp:57
Render::Material::TextureInfo _emissiveTexture
Definition: Material.hpp:59
Render::Material::TextureInfo _occlusionTexture
Definition: Material.hpp:58