aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs
index e0da9179..affd479b 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);