0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 23:55:47 +00:00
Ryujinx/Ryujinx.Graphics.OpenGL
riperiperi d461d4f68b
Fix OpenGL issues with RTSS overlays and OBS Game Capture (#3217)
OpenGL game overlays and hooks tend to make a lot of assumptions about how games present frames to the screen, since presentation in OpenGL kind of sucks and they would like to have info such as the size of the screen, or if the contents are SRGB rather than linear.

There are two ways of getting this. OBS hooks swap buffers to get a frame for video capture, but it actually checks the bound framebuffer at the time. I made sure that this matches the output framebuffer (the window) so that the output matches the size. RTSS checks the viewport size by default, but this was actually set to the last used viewport by the game, causing the OSD to fly all across the screen depending on how it was used (or res scale). The viewport is now manually set to match the output framebuffer size.

In the case of RTSS, it also loads its resources by destructively setting a pixel pack parameter without regard to what it was set to by the guest application. OpenGL state can be set for a long period of time and is not expected to be set before each call to a method, so randomly changing it isn't great practice. To fix this, I've added a line to set the pixel unpack alignment back to 4 after presentation, which should cover RTSS loading its incredibly ugly font.

- RTSS and overlays that use it should no longer cause certain textures to load incorrectly. (mario kart 8, pokemon legends arceus)
- OBS Game Capture should no longer crop the game output incorrectly, flicker randomly, or capture with incorrect gamma.

This doesn't fix issues with how RTSS reports our frame timings.
2022-03-20 13:37:45 -03:00
..
Helper Miria: The Death of OpenTK 3 (#2194) 2021-04-14 12:28:43 +02:00
Image Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
Queries Use Enum and Delegate.CreateDelegate generic overloads (#3111) 2022-02-13 10:50:07 -03:00
BackgroundContextWorker.cs Assign _backgroundContext before starting its worker thread. (#2299) 2021-05-20 15:29:10 +02:00
Buffer.cs Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00
Constants.cs Fix transform feedback errors caused by host pause/resume and multiple uses (#1634) 2020-10-25 17:23:42 -03:00
Debugger.cs Rename DebugLevel Performance to Slowdowns (#1450) 2020-08-07 15:30:06 +02:00
DrawTextureEmulation.cs Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
EnumConversion.cs Initial tessellation shader support (#2534) 2021-10-18 18:38:04 -03:00
FormatInfo.cs Add basic error logging to the GPU 2020-01-09 02:13:00 +01:00
FormatTable.cs Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
Framebuffer.cs Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
Handle.cs Spanify Graphics Abstraction Layer (#1226) 2020-05-23 11:46:09 +02:00
HwCapabilities.cs Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
IOpenGLContext.cs Miria: The Death of OpenTK 3 (#2194) 2021-04-14 12:28:43 +02:00
PersistentBuffers.cs Texture Sync, incompatible overlap handling, data flush improvements. (#2971) 2022-01-09 13:28:48 -03:00
Pipeline.cs Fix OpenGL issues with RTSS overlays and OBS Game Capture (#3217) 2022-03-20 13:37:45 -03:00
Program.cs Collapse AsSpan().Slice(..) calls into AsSpan(..) (#3145) 2022-02-22 10:32:10 -03:00
Renderer.cs Do not allow render targets not explicitly written by the fragment shader to be modified (#3063) 2022-02-16 23:15:39 +01:00
ResourcePool.cs Texture/Buffer Memory Management Improvements (#1408) 2020-09-10 16:44:04 -03:00
Ryujinx.Graphics.OpenGL.csproj infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Shader.cs Do not allow render targets not explicitly written by the fragment shader to be modified (#3063) 2022-02-16 23:15:39 +01:00
Sync.cs Only flush commands when creating sync on Intel/AMD (windows) (#2165) 2021-04-03 11:10:37 +11:00
VertexArray.cs Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557) 2021-08-26 23:50:28 +02:00
VertexBuffer.cs Initial work 2020-01-09 02:13:00 +01:00
Window.cs Fix OpenGL issues with RTSS overlays and OBS Game Capture (#3217) 2022-03-20 13:37:45 -03:00