mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-16 06:23:17 +01: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);
|
||||
}
|
||||
|
||||
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…
Reference in New Issue
Block a user