[GPU] Send correct window size to the vertex shader
This commit is contained in:
parent
d73a2c0239
commit
c4a231b9d8
2 changed files with 14 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue