summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/OGLGfx.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-06-09 13:40:21 +0200
committerGitHub <noreply@github.com>2023-06-09 13:40:21 +0200
commit092773ad0cd31cb0f3d111254e4e0bdb24f2c795 (patch)
tree817b91a21f01b8fdeacfdbc084f5aa6b9bad312b /Source/Core/VideoBackends/OGL/OGLGfx.cpp
parente16791f2ca5b6db29a54bc3b189d168632e4974b (diff)
parent8c3dc5b0d69bbe8a11b9cb0499f25f1164176f7c (diff)
Merge pull request #11859 from iwubcode/backend-multi-output
VideoBackends: add support to allow rendering to multiple output targets
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLGfx.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/OGLGfx.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLGfx.cpp b/Source/Core/VideoBackends/OGL/OGLGfx.cpp
index a89f05626b..e83ff209ea 100644
--- a/Source/Core/VideoBackends/OGL/OGLGfx.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLGfx.cpp
@@ -128,8 +128,8 @@ OGLGfx::OGLGfx(std::unique_ptr<GLContext> main_gl_context, float backbuffer_scal
if (!m_main_gl_context->IsHeadless())
{
m_system_framebuffer = std::make_unique<OGLFramebuffer>(
- nullptr, nullptr, AbstractTextureFormat::RGBA8, AbstractTextureFormat::Undefined,
- std::max(m_main_gl_context->GetBackBufferWidth(), 1u),
+ nullptr, nullptr, std::vector<AbstractTexture*>{}, AbstractTextureFormat::RGBA8,
+ AbstractTextureFormat::Undefined, std::max(m_main_gl_context->GetBackBufferWidth(), 1u),
std::max(m_main_gl_context->GetBackBufferHeight(), 1u), 1, 1, 0);
m_current_framebuffer = m_system_framebuffer.get();
}
@@ -226,11 +226,13 @@ std::unique_ptr<AbstractStagingTexture> OGLGfx::CreateStagingTexture(StagingText
return OGLStagingTexture::Create(type, config);
}
-std::unique_ptr<AbstractFramebuffer> OGLGfx::CreateFramebuffer(AbstractTexture* color_attachment,
- AbstractTexture* depth_attachment)
+std::unique_ptr<AbstractFramebuffer>
+OGLGfx::CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
+ std::vector<AbstractTexture*> additional_color_attachments)
{
return OGLFramebuffer::Create(static_cast<OGLTexture*>(color_attachment),
- static_cast<OGLTexture*>(depth_attachment));
+ static_cast<OGLTexture*>(depth_attachment),
+ std::move(additional_color_attachments));
}
std::unique_ptr<AbstractShader>