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

@ -851,19 +851,9 @@ void Renderer::SetScissorRect(const MathUtil::Rectangle<int>& rc)
glScissor(rc.left, rc.top, rc.GetWidth(), rc.GetHeight());
}
u16 Renderer::BBoxReadImpl(int index)
std::unique_ptr<::BoundingBox> Renderer::CreateBoundingBox() const
{
return static_cast<u16>(BoundingBox::Get(index));
}
void Renderer::BBoxWriteImpl(int index, u16 value)
{
BoundingBox::Set(index, value);
}
void Renderer::BBoxFlushImpl()
{
BoundingBox::Flush();
return std::make_unique<OGLBoundingBox>();
}
void Renderer::SetViewport(float x, float y, float width, float height, float near_depth,