diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-05 04:09:39 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-13 02:16:19 -0300 |
| commit | 75ccd9959ca7aa78b71fbb800ed2127d8613e9dc (patch) | |
| tree | 3b9b5c0779cff69ef135bb3394ae70a0d3a9804d /src/video_core/renderer_base.h | |
| parent | 19156292a374ddf15c6e8679f93d146a6d305fd6 (diff) | |
gpu: Report renderer errors with exceptions
Instead of using a two step initialization to report errors, initialize
the GPU renderer and rasterizer on the constructor and report errors
through std::runtime_error.
Diffstat (limited to 'src/video_core/renderer_base.h')
| -rw-r--r-- | src/video_core/renderer_base.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 51dde8eb5..320ee8d30 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -37,15 +37,11 @@ public: std::unique_ptr<Core::Frontend::GraphicsContext> context); virtual ~RendererBase(); - /// Initialize the renderer - [[nodiscard]] virtual bool Init() = 0; - - /// Shutdown the renderer - virtual void ShutDown() = 0; - /// Finalize rendering the guest frame and draw into the presentation texture virtual void SwapBuffers(const Tegra::FramebufferConfig* framebuffer) = 0; + [[nodiscard]] virtual RasterizerInterface* ReadRasterizer() = 0; + // Getter/setter functions: // ------------------------ @@ -57,14 +53,6 @@ public: return m_current_frame; } - [[nodiscard]] RasterizerInterface& Rasterizer() { - return *rasterizer; - } - - [[nodiscard]] const RasterizerInterface& Rasterizer() const { - return *rasterizer; - } - [[nodiscard]] Core::Frontend::GraphicsContext& Context() { return *context; } @@ -98,7 +86,6 @@ public: protected: Core::Frontend::EmuWindow& render_window; ///< Reference to the render window handle. - std::unique_ptr<RasterizerInterface> rasterizer; std::unique_ptr<Core::Frontend::GraphicsContext> context; f32 m_current_fps = 0.0f; ///< Current framerate, should be set by the renderer int m_current_frame = 0; ///< Current frame, should be set by the renderer |
