Add config option to determin if srgb frame buffer format should be used
This commit is contained in:
@@ -19,9 +19,10 @@ namespace openVulkanoCpp
|
||||
|
||||
uint32_t numThreads = 1;
|
||||
std::array<float, 4> frameBufferClearColor = { 0.39f, 0.58f, 0.93f, 1.0f };
|
||||
bool preferFramebufferFormatSRGB = true;
|
||||
|
||||
public:
|
||||
static EngineConfiguration* GetEngineConfiguration()
|
||||
[[nodiscard]] static EngineConfiguration* GetEngineConfiguration()
|
||||
{
|
||||
static EngineConfiguration* config = new EngineConfiguration();
|
||||
return config;
|
||||
@@ -32,7 +33,7 @@ namespace openVulkanoCpp
|
||||
this->numThreads = numThreads;
|
||||
}
|
||||
|
||||
uint32_t GetNumThreads() const
|
||||
[[nodiscard]] uint32_t GetNumThreads() const
|
||||
{
|
||||
return std::max(static_cast<uint32_t>(1), numThreads);
|
||||
}
|
||||
@@ -42,9 +43,19 @@ namespace openVulkanoCpp
|
||||
this->frameBufferClearColor = frameBufferClearColor;
|
||||
}
|
||||
|
||||
std::array<float, 4> GetFrameBufferClearColor() const
|
||||
[[nodiscard]] std::array<float, 4> GetFrameBufferClearColor() const
|
||||
{
|
||||
return frameBufferClearColor;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool GetPreferFramebufferFormatSRGB() const
|
||||
{
|
||||
return preferFramebufferFormatSRGB;
|
||||
}
|
||||
|
||||
void SetPreferFramebufferFormatSRGB(bool sRGB)
|
||||
{
|
||||
preferFramebufferFormatSRGB = sRGB;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user