diff options
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs index e0f12e4e..12239c4f 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLFrameBuffer.cs @@ -21,18 +21,6 @@ namespace Ryujinx.Graphics.Gal.OpenGL } } - private static readonly DrawBuffersEnum[] DrawBuffers = new DrawBuffersEnum[] - { - DrawBuffersEnum.ColorAttachment0, - DrawBuffersEnum.ColorAttachment1, - DrawBuffersEnum.ColorAttachment2, - DrawBuffersEnum.ColorAttachment3, - DrawBuffersEnum.ColorAttachment4, - DrawBuffersEnum.ColorAttachment5, - DrawBuffersEnum.ColorAttachment6, - DrawBuffersEnum.ColorAttachment7, - }; - private const int NativeWidth = 1280; private const int NativeHeight = 720; @@ -194,6 +182,25 @@ namespace Ryujinx.Graphics.Gal.OpenGL ReadTex = RawTex; } + public void SetMap(int[] Map) + { + if (Map != null && Map.Length > 0) + { + DrawBuffersEnum[] Mode = new DrawBuffersEnum[Map.Length]; + + for (int i = 0; i < Map.Length; i++) + { + Mode[i] = DrawBuffersEnum.ColorAttachment0 + Map[i]; + } + + GL.DrawBuffers(Mode.Length, Mode); + } + else + { + GL.DrawBuffer(DrawBufferMode.ColorAttachment0); + } + } + public void SetTransform(bool FlipX, bool FlipY, int Top, int Left, int Right, int Bottom) { this.FlipX = FlipX; @@ -421,8 +428,6 @@ namespace Ryujinx.Graphics.Gal.OpenGL } GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, DummyFrameBuffer); - - GL.DrawBuffers(8, DrawBuffers); } private void Attach(ref int OldHandle, int NewHandle, FramebufferAttachment FbAttachment) |
