Update texture sampler config handling
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace OpenVulkano::Scene
|
||||
{
|
||||
Texture Texture::PLACEHOLDER = Texture(SamplerConfig::DEFAULT, true);
|
||||
Texture Texture::PLACEHOLDER = Texture(&SamplerConfig::NEAREST, true);
|
||||
|
||||
void Texture::MakePlaceholder(uint32_t width, uint32_t height, Math::Vector4uc color1, Math::Vector4uc color2)
|
||||
{
|
||||
@@ -25,5 +25,6 @@ namespace OpenVulkano::Scene
|
||||
resolution = {width, height, 1};
|
||||
size = sizeof(Math::Vector4uc) * width * height;
|
||||
format = DataFormat::B8G8R8A8_UNORM;
|
||||
m_samplerConfig = &SamplerConfig::NEAREST;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace OpenVulkano::Scene
|
||||
Math::Vector3ui resolution = {0,0,0};
|
||||
DataFormat format = DataFormat::B8G8R8A8_UNORM;
|
||||
UpdateFrequency updateFrequency = UpdateFrequency::Never;
|
||||
const SamplerConfig& m_samplerConfig;
|
||||
const SamplerConfig* m_samplerConfig;
|
||||
bool updated = true;
|
||||
|
||||
Texture(const SamplerConfig& samplerConfig = SamplerConfig::DEFAULT, bool placeholder = false)
|
||||
Texture(const SamplerConfig* samplerConfig = &SamplerConfig::DEFAULT, bool placeholder = false)
|
||||
: m_samplerConfig(samplerConfig)
|
||||
{ if (placeholder) MakePlaceholder(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user