mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Move most backend functionality to VideoCommon
This commit is contained in:
@ -25,16 +25,17 @@ public:
|
||||
const MathUtil::Rectangle<int>& src_rect, u32 src_layer,
|
||||
u32 src_level, const MathUtil::Rectangle<int>& dst_rect,
|
||||
u32 dst_layer, u32 dst_level) override;
|
||||
void ScaleRectangleFromTexture(const AbstractTexture* source,
|
||||
const MathUtil::Rectangle<int>& srcrect,
|
||||
const MathUtil::Rectangle<int>& dstrect) override;
|
||||
void ResolveFromTexture(const AbstractTexture* src, const MathUtil::Rectangle<int>& rect,
|
||||
u32 layer, u32 level) override;
|
||||
void Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer,
|
||||
size_t buffer_size) override;
|
||||
|
||||
GLuint GetRawTexIdentifier() const;
|
||||
GLuint GetFramebuffer() const;
|
||||
GLuint GetGLTextureId() const { return m_texId; }
|
||||
GLenum GetGLTarget() const
|
||||
{
|
||||
return IsMultisampled() ? GL_TEXTURE_2D_MULTISAMPLE_ARRAY : GL_TEXTURE_2D_ARRAY;
|
||||
}
|
||||
GLenum GetGLFormatForImageTexture() const;
|
||||
|
||||
private:
|
||||
void BlitFramebuffer(OGLTexture* srcentry, const MathUtil::Rectangle<int>& src_rect,
|
||||
@ -42,7 +43,6 @@ private:
|
||||
u32 dst_layer, u32 dst_level);
|
||||
|
||||
GLuint m_texId;
|
||||
GLuint m_framebuffer = 0;
|
||||
};
|
||||
|
||||
class OGLStagingTexture final : public AbstractStagingTexture
|
||||
@ -79,13 +79,18 @@ private:
|
||||
class OGLFramebuffer final : public AbstractFramebuffer
|
||||
{
|
||||
public:
|
||||
OGLFramebuffer(AbstractTextureFormat color_format, AbstractTextureFormat depth_format, u32 width,
|
||||
OGLFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
|
||||
AbstractTextureFormat color_format, AbstractTextureFormat depth_format, u32 width,
|
||||
u32 height, u32 layers, u32 samples, GLuint fbo);
|
||||
~OGLFramebuffer() override;
|
||||
|
||||
static std::unique_ptr<OGLFramebuffer> Create(OGLTexture* color_attachment,
|
||||
OGLTexture* depth_attachment);
|
||||
|
||||
GLuint GetFBO() const { return m_fbo; }
|
||||
static std::unique_ptr<OGLFramebuffer> Create(const OGLTexture* color_attachment,
|
||||
const OGLTexture* depth_attachment);
|
||||
|
||||
// Used for updating the dimensions of the system/window framebuffer.
|
||||
void UpdateDimensions(u32 width, u32 height);
|
||||
|
||||
protected:
|
||||
GLuint m_fbo;
|
||||
|
Reference in New Issue
Block a user