From cb5c49d11b2322fe830591f3473f983934d20ebf Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 28 Apr 2020 17:19:40 -0400 Subject: [PATCH] fix more matrix sense snafus --- BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs | 4 ++-- Bizware/BizHawk.Bizware.BizwareGL/MatrixStack.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs b/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs index 8b58458887..cd0d0ce534 100644 --- a/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs +++ b/BizHawk.Client.EmuHawk/DisplayManager/Filters/Gui.cs @@ -388,7 +388,7 @@ namespace BizHawk.Client.EmuHawk.Filters if (renderTop) { GuiRenderer.Modelview.Push(); - GuiRenderer.Modelview.PostMultiplyMatrix(matTop); + GuiRenderer.Modelview.PreMultiplyMatrix(matTop); GuiRenderer.DrawSubrect(InputTexture, 0, 0, 256, 192, 0.0f, 0.0f, 1.0f, 0.5f); GuiRenderer.Modelview.Pop(); } @@ -396,7 +396,7 @@ namespace BizHawk.Client.EmuHawk.Filters if (renderBottom) { GuiRenderer.Modelview.Push(); - GuiRenderer.Modelview.PostMultiplyMatrix(matBot); + GuiRenderer.Modelview.PreMultiplyMatrix(matBot); GuiRenderer.DrawSubrect(InputTexture, 0, 0, 256, 192, 0.0f, 0.5f, 1.0f, 1.0f); GuiRenderer.Modelview.Pop(); } diff --git a/Bizware/BizHawk.Bizware.BizwareGL/MatrixStack.cs b/Bizware/BizHawk.Bizware.BizwareGL/MatrixStack.cs index 123de5d164..2590f0db56 100644 --- a/Bizware/BizHawk.Bizware.BizwareGL/MatrixStack.cs +++ b/Bizware/BizHawk.Bizware.BizwareGL/MatrixStack.cs @@ -83,7 +83,7 @@ namespace BizHawk.Bizware.BizwareGL public void Translate(Point pt) { Translate(pt.X, pt.Y, 0); IsDirty = true; } public void PostMultiplyMatrix(MatrixStack ms) { PostMultiplyMatrix(ms.Top); IsDirty = true; } - public void PostMultiplyMatrix(Matrix4 value) { Top = value * Top; IsDirty = true; } - public void PreMultiplyMatrix(Matrix4 value) { Top = Top * value; IsDirty = true; } + public void PostMultiplyMatrix(Matrix4 value) { Top = Top * value; IsDirty = true; } + public void PreMultiplyMatrix(Matrix4 value) { Top = value * Top; IsDirty = true; } } } \ No newline at end of file