1#pragma once
2
3#include <basis/seadTypes.h>
4#include <gfx/seadColor.h>
5#include <gfx/seadFrameBuffer.h>
6#include <math/seadBoundBox.h>
7#include <math/seadVector.h>
8
9namespace sead {
10class DisplayBuffer;
11class DrawContext;
12} // namespace sead
13
14namespace agl {
15
16class DrawContext;
17class RenderTargetColor;
18class RenderTargetDepth;
19
20class RenderBuffer : public sead::FrameBuffer {
21public:
22 RenderBuffer();
23 RenderBuffer(const sead::Vector2f& virtual_size, const sead::BoundBox2f& physical_area);
24 RenderBuffer(const sead::Vector2f& virtual_size, f32 physical_x, f32 physical_y, f32 physical_w,
25 f32 physical_h);
26 ~RenderBuffer() override;
27
28 void copyToDisplayBuffer(sead::DrawContext* draw_context,
29 const sead::DisplayBuffer* display_buffer) const override;
30 void clear(sead::DrawContext* draw_context, u32 clr_flag, const sead::Color4f& color, f32 depth,
31 u32 stencil) const override;
32 void bindImpl_(sead::DrawContext* draw_context) const override;
33
34 void initialize_();
35 void setRenderTargetColorNullAll();
36 void adjustPhysicalAreaAndVirtualSizeFromColorTarget(u32 color_index);
37 void invalidateGPUCache(DrawContext* draw_context) const;
38 void bind_(DrawContext* draw_context, u16 bitmap) const;
39
40private:
41 RenderTargetColor* mRenderTargetColor[8];
42 RenderTargetDepth* mRenderTargetDepth;
43};
44
45} // namespace agl
46