VideoCommon: Abstract bounding box

This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
This commit is contained in:
Techjar
2021-06-09 07:42:21 -04:00
parent 7ec02ee4d3
commit 1161af8059
41 changed files with 617 additions and 708 deletions

View File

@ -10,6 +10,7 @@
#include "VideoCommon/RenderBase.h"
class BoundingBox;
class SWOGLWindow;
namespace SW
@ -43,8 +44,6 @@ public:
u32 AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) override;
void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override {}
u16 BBoxReadImpl(int index) override;
void BBoxWriteImpl(int index, u16 value) override;
void RenderXFBToScreen(const MathUtil::Rectangle<int>& target_rc,
const AbstractTexture* source_texture,
@ -59,6 +58,9 @@ public:
const AbstractTexture* src_texture,
const MathUtil::Rectangle<int>& src_rect) override;
protected:
std::unique_ptr<BoundingBox> CreateBoundingBox() const override;
private:
std::unique_ptr<SWOGLWindow> m_window;
};