Renderer: Handle more depthstencil formats (as Depth24Stencil8 may not be supported everywhere)
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <Nazara/Shader/ShaderWriter.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
#include <Nazara/Utility/PixelFormat.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@@ -47,6 +48,8 @@ namespace Nz
|
||||
std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const std::filesystem::path& sourcePath, const ShaderWriter::States& states);
|
||||
virtual std::shared_ptr<Texture> InstantiateTexture(const TextureInfo& params) = 0;
|
||||
virtual std::shared_ptr<TextureSampler> InstantiateTextureSampler(const TextureSamplerInfo& params) = 0;
|
||||
|
||||
virtual bool IsTextureFormatSupported(PixelFormat format, TextureUsage usage) const = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Nz
|
||||
{
|
||||
struct RenderWindowParameters
|
||||
{
|
||||
std::vector<PixelFormat> depthFormats = {Nz::PixelFormat::Depth24Stencil8, Nz::PixelFormat::Depth32, Nz::PixelFormat::Depth24}; //< By order of preference
|
||||
std::vector<PixelFormat> depthFormats = {Nz::PixelFormat::Depth24Stencil8, Nz::PixelFormat::Depth32FStencil8, Nz::PixelFormat::Depth16Stencil8, Nz::PixelFormat::Depth32F, Nz::PixelFormat::Depth24}; //< By order of preference
|
||||
bool verticalSync = false;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user