mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 09:35:27 +00:00
[GPU] Send correct window size to the vertex shader
This commit is contained in:
parent
42ebfdff7f
commit
7dd14a4f3a
|
@ -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