0
0
Fork 0

[GPU] Send correct window size to the vertex shader

This commit is contained in:
gdkchan 2018-04-14 01:14:42 -03:00
parent 42ebfdff7f
commit 7dd14a4f3a
2 changed files with 14 additions and 1 deletions

View file

@ -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);

View file

@ -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)