diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-17 20:31:14 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-02-26 03:22:59 +0100 |
commit | dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8 (patch) | |
tree | 15415ab06bdba99ca408dad1c526c31313c3e8af /src/video_core/renderer_opengl/renderer_opengl.h | |
parent | renderer_opengl: Add OGLRenderbuffer to resource/state management. (diff) | |
download | yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.tar yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.tar.gz yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.tar.bz2 yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.tar.lz yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.tar.xz yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.tar.zst yuzu-dc672ca4b39c1ab9c2ee81257b6fb605a23cbcd8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index b56328a7f..797965925 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -44,19 +44,21 @@ struct ScreenInfo { TextureInfo texture; }; +struct PresentationTexture { + u32 width = 0; + u32 height = 0; + OGLTexture texture; +}; + class RendererOpenGL final : public VideoCore::RendererBase { public: explicit RendererOpenGL(Core::Frontend::EmuWindow& emu_window, Core::System& system); ~RendererOpenGL() override; - /// Swap buffers (render frame) - void SwapBuffers(const Tegra::FramebufferConfig* framebuffer) override; - - /// Initialize the renderer bool Init() override; - - /// Shutdown the renderer void ShutDown() override; + void SwapBuffers(const Tegra::FramebufferConfig* framebuffer) override; + void TryPresent(int timeout_ms) override; private: /// Initializes the OpenGL state and creates persistent objects. @@ -74,10 +76,7 @@ private: void DrawScreenTriangles(const ScreenInfo& screen_info, float x, float y, float w, float h); - /// Updates the framerate. - void UpdateFramerate(); - - void CaptureScreenshot(); + void RenderScreenshot(); /// Loads framebuffer from emulated memory into the active OpenGL texture. void LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuffer); @@ -87,6 +86,8 @@ private: void LoadColorToActiveGLTexture(u8 color_r, u8 color_g, u8 color_b, u8 color_a, const TextureInfo& texture); + void PrepareRendertarget(const Tegra::FramebufferConfig* framebuffer); + Core::Frontend::EmuWindow& emu_window; Core::System& system; @@ -107,6 +108,9 @@ private: /// Used for transforming the framebuffer orientation Tegra::FramebufferConfig::TransformFlags framebuffer_transform_flags; Common::Rectangle<int> framebuffer_crop_rect; + + /// Represents if the final render frame is sRGB + bool is_srgb{}; }; } // namespace OpenGL |