Renderer: Blit texture to window instead of using a full renderpass

This may improve performance and allow for render targets to customize how they blit the final texture (allowing for render-to-texture)
This commit is contained in:
SirLynix
2023-11-17 16:59:31 +01:00
parent f2e77fb8a5
commit 97d5640967
38 changed files with 448 additions and 265 deletions

View File

@@ -32,6 +32,7 @@ namespace Nz
std::shared_ptr<CommandPool> CreateCommandPool(QueueType queueType) override;
inline GL::Context& GetContext();
inline OpenGLDevice& GetDevice();
const OpenGLFramebuffer& GetFramebuffer(std::size_t i) const override;
std::size_t GetFramebufferCount() const override;
PresentMode GetPresentMode() const override;
@@ -50,8 +51,9 @@ namespace Nz
private:
std::optional<OpenGLRenderPass> m_renderPass;
std::size_t m_currentFrame;
std::vector<std::unique_ptr<OpenGLRenderImage>> m_renderImage;
std::shared_ptr<GL::Context> m_context;
std::vector<std::unique_ptr<OpenGLRenderImage>> m_renderImage;
OpenGLDevice& m_device;
OpenGLWindowFramebuffer m_framebuffer;
PresentMode m_presentMode;
PresentModeFlags m_supportedPresentModes;