Skip to content
Snippets Groups Projects
Commit cdbfa863 authored by Lars Hoerttrich's avatar Lars Hoerttrich
Browse files

[#57] moved descriptorSetHandle to material-class

parent 49066023
No related branches found
No related tags found
1 merge request!44Resolve "Material (Modul)"
Pipeline #25648 failed
#pragma once #pragma once
#include <vkcv/Handles.hpp>
namespace vkcv::material { namespace vkcv::material {
class Material { class Material {
private: private:
public: public:
const DescriptorSetHandle m_DescriptorSetHandle;
protected:
Material(const DescriptorSetHandle& setHandle);
}; };
} }
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include <vector> #include <vector>
#include <vkcv/Handles.hpp>
#include <vkcv/DescriptorConfig.hpp> #include <vkcv/DescriptorConfig.hpp>
#include <vkcv/Core.hpp> #include <vkcv/Core.hpp>
...@@ -13,15 +12,17 @@ namespace vkcv::material ...@@ -13,15 +12,17 @@ namespace vkcv::material
{ {
class PBRMaterial : Material class PBRMaterial : Material
{ {
private:
PBRMaterial(const ImageHandle& colorImg,
const SamplerHandle& colorSmp,
const ImageHandle& normalImg,
const SamplerHandle& normalSmp,
const ImageHandle& metRoughImg,
const SamplerHandle& metRoughSmp,
const DescriptorSetHandle& setHandle) noexcept;
public: public:
PBRMaterial() = delete; PBRMaterial() = delete;
PBRMaterial(const ImageHandle &colorImg,
const SamplerHandle &colorSmp,
const ImageHandle &normalImg,
const SamplerHandle &normalSmp,
const ImageHandle &metRoughImg,
const SamplerHandle &metRoughSmp,
const DescriptorSetHandle &setHandle) noexcept;
const ImageHandle m_ColorTexture; const ImageHandle m_ColorTexture;
const SamplerHandle m_ColorSampler; const SamplerHandle m_ColorSampler;
...@@ -35,8 +36,6 @@ namespace vkcv::material ...@@ -35,8 +36,6 @@ namespace vkcv::material
// ImageHandle m_OcclusionTexture; // ImageHandle m_OcclusionTexture;
// SamplerHandle m_EmissiveTexture; // SamplerHandle m_EmissiveTexture;
const DescriptorSetHandle m_DescriptorSetHandle;
/* /*
* Returns the material's necessary descriptor bindings which serves as its descriptor layout * Returns the material's necessary descriptor bindings which serves as its descriptor layout
* The binding is in the following order: * The binding is in the following order:
......
...@@ -5,4 +5,8 @@ namespace vkcv::material { ...@@ -5,4 +5,8 @@ namespace vkcv::material {
//TODO //TODO
Material::Material(const DescriptorSetHandle& setHandle) : m_DescriptorSetHandle(setHandle)
{
}
} }
...@@ -17,7 +17,7 @@ namespace vkcv::material ...@@ -17,7 +17,7 @@ namespace vkcv::material
m_NormalSampler(normalSmp), m_NormalSampler(normalSmp),
m_MetRoughTexture(metRoughImg), m_MetRoughTexture(metRoughImg),
m_MetRoughSampler(metRoughSmp), m_MetRoughSampler(metRoughSmp),
m_DescriptorSetHandle(setHandle) Material(setHandle)
{ {
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment