VideoBackends: add support to allow rendering to multiple output textures

This commit is contained in:
iwubcode
2023-05-28 20:59:02 -05:00
parent 252d3f353a
commit 834f8f7b5c
43 changed files with 713 additions and 327 deletions

View File

@ -3,6 +3,8 @@
#pragma once
#include <vector>
#include "Common/CommonTypes.h"
#include "Common/MathUtil.h"
#include "VideoCommon/TextureConfig.h"
@ -18,12 +20,14 @@ class AbstractFramebuffer
{
public:
AbstractFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
std::vector<AbstractTexture*> additional_color_attachments,
AbstractTextureFormat color_format, AbstractTextureFormat depth_format,
u32 width, u32 height, u32 layers, u32 samples);
virtual ~AbstractFramebuffer();
static bool ValidateConfig(const AbstractTexture* color_attachment,
const AbstractTexture* depth_attachment);
const AbstractTexture* depth_attachment,
const std::vector<AbstractTexture*>& additional_color_attachments);
AbstractTexture* GetColorAttachment() const { return m_color_attachment; }
AbstractTexture* GetDepthAttachment() const { return m_depth_attachment; }
@ -42,6 +46,7 @@ protected:
AbstractTexture* m_depth_attachment;
AbstractTextureFormat m_color_format;
AbstractTextureFormat m_depth_format;
std::vector<AbstractTexture*> m_additional_color_attachments;
u32 m_width;
u32 m_height;
u32 m_layers;