Graphics: Add MaterialPassRegistry

This commit is contained in:
Jérôme Leclercq
2021-07-29 20:16:06 +02:00
parent 5b1123b971
commit 9a311da2c8
20 changed files with 181 additions and 52 deletions

View File

@@ -9,6 +9,7 @@
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Graphics/Config.hpp>
#include <Nazara/Graphics/MaterialPassRegistry.hpp>
#include <Nazara/Graphics/TextureSamplerCache.hpp>
#include <Nazara/Renderer/Renderer.hpp>
#include <Nazara/Renderer/RenderDevice.hpp>
@@ -36,6 +37,8 @@ namespace Nz
inline const std::shared_ptr<RenderPipelineLayout>& GetBlitPipelineLayout() const;
inline const std::shared_ptr<AbstractBuffer>& GetFullscreenVertexBuffer() const;
inline const std::shared_ptr<VertexDeclaration>& GetFullscreenVertexDeclaration() const;
inline MaterialPassRegistry& GetMaterialPassRegistry();
inline const MaterialPassRegistry& GetMaterialPassRegistry() const;
inline PixelFormat GetPreferredDepthStencilFormat() const;
inline const std::shared_ptr<RenderPipelineLayout>& GetReferencePipelineLayout() const;
inline const std::shared_ptr<RenderDevice>& GetRenderDevice() const;
@@ -58,6 +61,7 @@ namespace Nz
private:
void BuildBlitPipeline();
void BuildFullscreenVertexBuffer();
void RegisterMaterialPasses();
void SelectDepthStencilFormats();
std::optional<RenderPassCache> m_renderPassCache;
@@ -68,6 +72,7 @@ namespace Nz
std::shared_ptr<RenderPipelineLayout> m_blitPipelineLayout;
std::shared_ptr<RenderPipelineLayout> m_referencePipelineLayout;
std::shared_ptr<VertexDeclaration> m_fullscreenVertexDeclaration;
MaterialPassRegistry m_materialPassRegistry;
PixelFormat m_preferredDepthStencilFormat;
static Graphics* s_instance;