Skip to content
Snippets Groups Projects
Verified Commit c86121b2 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#56] Fixed initialization problem for MSVC

parent aa0c6c36
No related branches found
No related tags found
1 merge request!45Resolve "Szene-Repräsentation"
Pipeline #26123 failed
...@@ -21,10 +21,11 @@ namespace vkcv::material { ...@@ -21,10 +21,11 @@ namespace vkcv::material {
const std::vector<DescriptorBinding>& Material::getDescriptorBindings(MaterialType type) const std::vector<DescriptorBinding>& Material::getDescriptorBindings(MaterialType type)
{ {
static std::vector<DescriptorBinding> pbr_bindings;
static std::vector<DescriptorBinding> default_bindings;
switch (type) { switch (type) {
case MaterialType::PBR_MATERIAL: case MaterialType::PBR_MATERIAL:
static std::vector<DescriptorBinding> pbr_bindings;
if (pbr_bindings.empty()) { if (pbr_bindings.empty()) {
pbr_bindings.emplace_back(0, DescriptorType::IMAGE_SAMPLED, 1, ShaderStage::FRAGMENT); pbr_bindings.emplace_back(0, DescriptorType::IMAGE_SAMPLED, 1, ShaderStage::FRAGMENT);
pbr_bindings.emplace_back(1, DescriptorType::SAMPLER, 1, ShaderStage::FRAGMENT); pbr_bindings.emplace_back(1, DescriptorType::SAMPLER, 1, ShaderStage::FRAGMENT);
...@@ -40,7 +41,6 @@ namespace vkcv::material { ...@@ -40,7 +41,6 @@ namespace vkcv::material {
return pbr_bindings; return pbr_bindings;
default: default:
static std::vector<DescriptorBinding> default_bindings;
return default_bindings; return default_bindings;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment