mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-27 18:02:01 +00:00
[GPU] Send correct window size to the vertex shader
This commit is contained in:
parent
42ebfdff7f
commit
7dd14a4f3a
2 changed files with 14 additions and 1 deletions
|
@ -196,6 +196,19 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
GL.UseProgram(CurrentProgram);
|
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)
|
public void SetViewport(int X, int Y, int Width, int Height)
|
||||||
{
|
{
|
||||||
Viewport = new Rect(X, Y, Width, Height);
|
Viewport = new Rect(X, Y, Width, Height);
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
|
|
||||||
public void SetWindowSize(int Width, int Height)
|
public void SetWindowSize(int Width, int Height)
|
||||||
{
|
{
|
||||||
//TODO
|
FrameBuffer.SetWindowSize(Width, Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBlendEnable(bool Enable)
|
public void SetBlendEnable(bool Enable)
|
||||||
|
|
Loading…
Reference in a new issue