Remove uneeded pop matrix possibly causing a crash

This commit is contained in:
KillzXGaming 2019-11-23 15:52:41 -05:00
parent 32d8d393b1
commit 211b530c45

View file

@ -87,7 +87,8 @@ namespace LayoutBXLYT
};
}
DrawRectangle(pane, gameWindow, pane.Rectangle, TexCoords, Colors, false, effectiveAlpha, isSelected);
if (!Runtime.DEVELOPER_DEBUG_MODE)
DrawRectangle(pane, gameWindow, pane.Rectangle, TexCoords, Colors, false, effectiveAlpha, isSelected);
ShaderLoader.CafeShader.Disable();
}
@ -152,9 +153,8 @@ namespace LayoutBXLYT
ShaderLoader.RevShader.Disable();
}
GL.Disable(EnableCap.Texture2D);
GL.BindTexture(TextureTarget.Texture2D, 0);
GL.PopAttrib();
GL.Disable(EnableCap.Texture2D);
GL.UseProgram(0);
}
@ -1304,18 +1304,6 @@ namespace LayoutBXLYT
colors[i] = Color.FromArgb(Utils.FloatToIntClamp(outAlpha), colors[i]);
}
if (Runtime.DEVELOPER_DEBUG_MODE)
{
GL.Begin(PrimitiveType.LineLoop);
GL.Color4(selectionOutline ? Color.Red : colors[0]);
GL.Vertex2(rect.BottomLeftPoint);
GL.Vertex2(rect.BottomRightPoint);
GL.Vertex2(rect.TopRightPoint);
GL.Vertex2(rect.TopLeftPoint);
GL.End();
return;
}
if (LayoutEditor.UseLegacyGL)
{
if (useLines)