diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs index e0da9179a3..affd479b75 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs @@ -196,6 +196,19 @@ namespace Ryujinx.Graphics.Gal.OpenGL GL.UseProgram(CurrentProgram); } + public void SetWindowSize(int Width, int Height) + { + int CurrentProgram = GL.GetInteger(GetPName.CurrentProgram); + + GL.UseProgram(Shader.Handle); + + int WindowSizeUniformLocation = GL.GetUniformLocation(Shader.Handle, "window_size"); + + GL.Uniform2(WindowSizeUniformLocation, new Vector2(Width, Height)); + + GL.UseProgram(CurrentProgram); + } + public void SetViewport(int X, int Y, int Width, int Height) { Viewport = new Rect(X, Y, Width, Height); diff --git a/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs b/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs index 5e066e3f19..cf2da91c55 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs @@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL public void SetWindowSize(int Width, int Height) { - //TODO + FrameBuffer.SetWindowSize(Width, Height); } public void SetBlendEnable(bool Enable)