mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 22:29:47 -06:00
Refactor the GPU to be object-oriented (#1873)
* Refactor GPU3D to be an object - Who has two thumbs and is the sworn enemy of global state? This guy! * Refactor GPU itself to be an object - Wow, it's used in a lot of places - Also introduce a new `Melon` namespace for a few classes - I expect other classes will be moved into `Melon` over time * Change signature of Renderer3D::SetRenderSettings - Make it noexcept, and its argument const * Remove some stray whitespace
This commit is contained in:

committed by
GitHub

parent
88072a02c5
commit
4558be0d8e
@ -20,19 +20,25 @@
|
||||
|
||||
#include "GPU2D.h"
|
||||
|
||||
namespace Melon
|
||||
{
|
||||
class GPU;
|
||||
}
|
||||
|
||||
namespace GPU2D
|
||||
{
|
||||
|
||||
class SoftRenderer : public Renderer2D
|
||||
{
|
||||
public:
|
||||
SoftRenderer();
|
||||
SoftRenderer(Melon::GPU& gpu);
|
||||
~SoftRenderer() override {}
|
||||
|
||||
void DrawScanline(u32 line, Unit* unit) override;
|
||||
void DrawSprites(u32 line, Unit* unit) override;
|
||||
void VBlankEnd(Unit* unitA, Unit* unitB) override;
|
||||
private:
|
||||
Melon::GPU& GPU;
|
||||
alignas(8) u32 BGOBJLine[256*3];
|
||||
u32* _3DLine;
|
||||
|
||||
|
Reference in New Issue
Block a user