Renderer: RenderWindow now requires a RenderDevice

This commit is contained in:
Lynix
2021-05-16 23:13:00 +02:00
parent 40772f2137
commit 13feaf4aab
30 changed files with 132 additions and 107 deletions

View File

@@ -31,7 +31,7 @@ namespace Nz
Graphics(Config config);
~Graphics();
inline RenderDevice& GetRenderDevice();
inline const std::shared_ptr<RenderDevice>& GetRenderDevice() const;
inline TextureSamplerCache& GetSamplerCache();
inline const std::shared_ptr<AbstractBuffer>& GetViewerDataUBO();

View File

@@ -7,9 +7,9 @@
namespace Nz
{
inline RenderDevice& Graphics::GetRenderDevice()
inline const std::shared_ptr<RenderDevice>& Graphics::GetRenderDevice() const
{
return *m_renderDevice;
return m_renderDevice;
}
inline TextureSamplerCache& Graphics::GetSamplerCache()

View File

@@ -51,7 +51,7 @@ namespace Nz
});
}
m_pipelineLayout = Graphics::Instance()->GetRenderDevice().InstantiateRenderPipelineLayout(std::move(info));
m_pipelineLayout = Graphics::Instance()->GetRenderDevice()->InstantiateRenderPipelineLayout(std::move(info));
}
inline auto MaterialSettings::GetBuilderData() const -> const Builder&