| 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 | |
| 9 | namespace sead { |
| 10 | class DisplayBuffer; |
| 11 | class DrawContext; |
| 12 | } // namespace sead |
| 13 | |
| 14 | namespace agl { |
| 15 | |
| 16 | class DrawContext; |
| 17 | class RenderTargetColor; |
| 18 | class RenderTargetDepth; |
| 19 | |
| 20 | class RenderBuffer : public sead::FrameBuffer { |
| 21 | public: |
| 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 | |
| 40 | private: |
| 41 | RenderTargetColor* mRenderTargetColor[8]; |
| 42 | RenderTargetDepth* mRenderTargetDepth; |
| 43 | }; |
| 44 | |
| 45 | } // namespace agl |
| 46 | |