diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-28 01:51:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 01:51:55 +0100 |
commit | 969357af1a26e74eaa5b0cec677d929bca94dc57 (patch) | |
tree | 59a8bb28215dfbdc817227e4b0b7ea37e6f5ef70 /src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h | |
parent | AM/ICommonStateGetter: Stub SetLcdBacklighOffEnabled (#3454) (diff) | |
parent | renderer_opengl: Reduce swap chain size to 3. (diff) | |
download | yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.tar yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.tar.gz yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.tar.bz2 yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.tar.lz yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.tar.xz yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.tar.zst yuzu-969357af1a26e74eaa5b0cec677d929bca94dc57.zip |
Diffstat (limited to 'src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h')
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h index c753085a8..b80669ff0 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h @@ -10,17 +10,12 @@ class EmuWindow_SDL2_GL final : public EmuWindow_SDL2 { public: - explicit EmuWindow_SDL2_GL(bool fullscreen); + explicit EmuWindow_SDL2_GL(Core::System& system, bool fullscreen); ~EmuWindow_SDL2_GL(); - /// Swap buffers to display the next frame - void SwapBuffers() override; - - /// Makes the graphics context current for the caller thread void MakeCurrent() override; - - /// Releases the GL context from the caller thread void DoneCurrent() override; + void Present() override; /// Ignored in OpenGL void RetrieveVulkanHandlers(void* get_instance_proc_addr, void* instance, @@ -29,10 +24,17 @@ public: std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override; private: + /// Fake hidden window for the core context + SDL_Window* dummy_window{}; + /// Whether the GPU and driver supports the OpenGL extension required bool SupportsRequiredGLExtensions(); using SDL_GLContext = void*; + /// The OpenGL context associated with the window - SDL_GLContext gl_context; + SDL_GLContext window_context; + + /// The OpenGL context associated with the core + std::unique_ptr<Core::Frontend::GraphicsContext> core_context; }; |