diff options
| author | zhupengfei <zhupengfei321@sina.cn> | 2018-08-31 14:16:16 +0800 |
|---|---|---|
| committer | fearlessTobi <thm.frey@gmail.com> | 2018-12-18 22:54:41 +0100 |
| commit | a2be49305d8c5c66cfa2ec2060688013cf3729b9 (patch) | |
| tree | 2a2e38805ae8af0718628682d7e911ccb253fc16 /src/video_core/renderer_opengl/renderer_opengl.h | |
| parent | f761e3ef8627b9f93b9766d6de76a61af7c9e5a9 (diff) | |
yuzu, video_core: Screenshot functionality
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
Diffstat (limited to 'src/video_core/renderer_opengl/renderer_opengl.h')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index c0868c0e4..067fad81b 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -16,6 +16,10 @@ namespace Core::Frontend { class EmuWindow; } +namespace Layout { +class FramebufferLayout; +} + namespace OpenGL { /// Structure used for storing information about the textures for the Switch screen @@ -66,10 +70,12 @@ private: void ConfigureFramebufferTexture(TextureInfo& texture, const Tegra::FramebufferConfig& framebuffer); - void DrawScreen(); + void DrawScreen(const Layout::FramebufferLayout& layout); void DrawScreenTriangles(const ScreenInfo& screen_info, float x, float y, float w, float h); void UpdateFramerate(); + void CaptureScreenshot(); + // Loads framebuffer from emulated memory into the display information structure void LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuffer); // Fills active OpenGL texture with the given RGBA color. @@ -82,6 +88,7 @@ private: OGLVertexArray vertex_array; OGLBuffer vertex_buffer; OGLProgram shader; + OGLFramebuffer screenshot_framebuffer; /// Display information for Switch screen ScreenInfo screen_info; |
