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

@ -11,6 +11,8 @@
#include "Common/GL/GLExtensions/GLExtensions.h"
#include "VideoCommon/RenderBase.h"
class BoundingBox;
namespace OGL
{
class OGLFramebuffer;
@ -128,10 +130,6 @@ public:
void BindBackbuffer(const ClearColor& clear_color = {}) override;
void PresentBackbuffer() override;
u16 BBoxReadImpl(int index) override;
void BBoxWriteImpl(int index, u16 value) override;
void BBoxFlushImpl() override;
void BeginUtilityDrawing() override;
void EndUtilityDrawing() override;
@ -164,6 +162,9 @@ public:
// Restores FBO binding after it's been changed.
void RestoreFramebufferBinding();
protected:
std::unique_ptr<BoundingBox> CreateBoundingBox() const override;
private:
void CheckForSurfaceChange();
void CheckForSurfaceResize();