diff options
author | Jesse Talavera <jesse@jesse.tg> | 2023-12-15 08:53:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 14:53:31 +0100 |
commit | c867a7f1c09b3c5f07e0772fcddabce07bcd7fe7 (patch) | |
tree | c8f7fc0b351ff945b4e581c63873dbd460b2aa32 /src/GPU3D.h | |
parent | 6f47c9ed4c0e5b1035089805f272c6965343f113 (diff) |
Make the initial 3D renderer configurable via `NDSArgs` (#1913)
* Allow 3D renderers to be created without passing `GPU` to the constructor
* Make the initial 3D renderer configurable via `NDSArgs`
* Fix a compiler error
Diffstat (limited to 'src/GPU3D.h')
-rw-r--r-- | src/GPU3D.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/GPU3D.h b/src/GPU3D.h index eb975c6..0c900c6 100644 --- a/src/GPU3D.h +++ b/src/GPU3D.h @@ -101,12 +101,12 @@ public: void CheckFIFOIRQ() noexcept; void CheckFIFODMA() noexcept; - void VCount144() noexcept; + void VCount144(GPU& gpu) noexcept; void VBlank() noexcept; - void VCount215() noexcept; + void VCount215(GPU& gpu) noexcept; - void RestartFrame() noexcept; - void Stop() noexcept; + void RestartFrame(GPU& gpu) noexcept; + void Stop(const GPU& gpu) noexcept; void SetRenderXPos(u16 xpos) noexcept; [[nodiscard]] u16 GetRenderXPos() const noexcept { return RenderXPos; } @@ -125,7 +125,7 @@ public: void Write8(u32 addr, u8 val) noexcept; void Write16(u32 addr, u16 val) noexcept; void Write32(u32 addr, u32 val) noexcept; - void Blit() noexcept; + void Blit(const GPU& gpu) noexcept; private: melonDS::NDS& NDS; typedef union @@ -334,19 +334,19 @@ public: Renderer3D(const Renderer3D&) = delete; Renderer3D& operator=(const Renderer3D&) = delete; - virtual void Reset() = 0; + virtual void Reset(GPU& gpu) = 0; // This "Accelerated" flag currently communicates if the framebuffer should // be allocated differently and other little misc handlers. Ideally there // are more detailed "traits" that we can ask of the Renderer3D type const bool Accelerated; - virtual void VCount144() {}; - virtual void Stop() {} - virtual void RenderFrame() = 0; - virtual void RestartFrame() {}; + virtual void VCount144(GPU& gpu) {}; + virtual void Stop(const GPU& gpu) {} + virtual void RenderFrame(GPU& gpu) = 0; + virtual void RestartFrame(GPU& gpu) {}; virtual u32* GetLine(int line) = 0; - virtual void Blit() {}; + virtual void Blit(const GPU& gpu) {}; virtual void PrepareCaptureFrame() {} protected: Renderer3D(bool Accelerated); |