diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-11 05:58:57 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-22 06:51:45 +0200 |
commit | da53bcee60fced902479b72b40ed26b099fa9938 (patch) | |
tree | b83232ad60b7725090b31bd3e347c9df774ced40 /src/video_core/renderer_base.h | |
parent | Merge pull request #4536 from lioncash/semi3 (diff) | |
download | yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.gz yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.bz2 yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.lz yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.xz yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.zst yuzu-da53bcee60fced902479b72b40ed26b099fa9938.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_base.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 1d85219b6..649074acd 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -15,7 +15,8 @@ namespace Core::Frontend { class EmuWindow; -} +class GraphicsContext; +} // namespace Core::Frontend namespace VideoCore { @@ -25,14 +26,15 @@ struct RendererSettings { // Screenshot std::atomic<bool> screenshot_requested{false}; - void* screenshot_bits; + void* screenshot_bits{}; std::function<void()> screenshot_complete_callback; Layout::FramebufferLayout screenshot_framebuffer_layout; }; class RendererBase : NonCopyable { public: - explicit RendererBase(Core::Frontend::EmuWindow& window); + explicit RendererBase(Core::Frontend::EmuWindow& window, + std::unique_ptr<Core::Frontend::GraphicsContext> context); virtual ~RendererBase(); /// Initialize the renderer @@ -68,6 +70,14 @@ public: return *rasterizer; } + Core::Frontend::GraphicsContext& Context() { + return *context; + } + + const Core::Frontend::GraphicsContext& Context() const { + return *context; + } + Core::Frontend::EmuWindow& GetRenderWindow() { return render_window; } @@ -94,6 +104,7 @@ 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 |