diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-04-14 00:39:24 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-14 00:39:24 -0300 |
| commit | 42ebfdff7f2889be38a3415bf33aeb41df90bd98 (patch) | |
| tree | 556639adf9f0ef20e0fc64f9293ccc8c6e11b5e3 /Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs | |
| parent | 47100ec8c1b3cabc7d53654163c1dd30b58d483d (diff) | |
[GPU] Fix frame buffer being upside down in some cases
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs b/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs index b3ccae5f..5e066e3f 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OpenGLRenderer.cs @@ -141,6 +141,11 @@ namespace Ryujinx.Graphics.Gal.OpenGL ActionsQueue.Enqueue(() => FrameBuffer.SetTransform(Transform, Offs)); } + public void SetViewport(int X, int Y, int Width, int Height) + { + ActionsQueue.Enqueue(() => FrameBuffer.SetViewport(X, Y, Width, Height)); + } + public void ClearBuffers(int RtIndex, GalClearBufferFlags Flags) { ActionsQueue.Enqueue(() => Rasterizer.ClearBuffers(RtIndex, Flags)); @@ -218,6 +223,16 @@ namespace Ryujinx.Graphics.Gal.OpenGL ActionsQueue.Enqueue(() => Shader.SetUniform1(UniformName, Value)); } + public void SetUniform2F(string UniformName, float X, float Y) + { + if (UniformName == null) + { + throw new ArgumentNullException(nameof(UniformName)); + } + + ActionsQueue.Enqueue(() => Shader.SetUniform2F(UniformName, X, Y)); + } + public IEnumerable<ShaderDeclInfo> GetTextureUsage(long Tag) { return Shader.GetTextureUsage(Tag); |
