diff options
-rw-r--r-- | ActiveRagdoll/Assets/TABG/Scripts/Debug/GLHandle.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Debug/GLHandle.cs b/ActiveRagdoll/Assets/TABG/Scripts/Debug/GLHandle.cs index 7f2eeae..ea64cec 100644 --- a/ActiveRagdoll/Assets/TABG/Scripts/Debug/GLHandle.cs +++ b/ActiveRagdoll/Assets/TABG/Scripts/Debug/GLHandle.cs @@ -6,14 +6,17 @@ namespace Rigging.Debugging public class GLScope : IDisposable { + bool bScopeBefore; + public GLScope(bool enabled) { + bScopeBefore = GLHandle.bScopeEnabled; GLHandle.EnterScope(enabled); } public void Dispose() { - GLHandle.EndScope(); + GLHandle.EndScope(bScopeBefore); } } @@ -27,7 +30,7 @@ namespace Rigging.Debugging private static Material lineMaterial; - private static bool bScopeEnabled; + public static bool bScopeEnabled; static GLHandle() { @@ -87,7 +90,7 @@ namespace Rigging.Debugging bScopeEnabled = enabled; } - public static void EndScope() + public static void EndScope(bool enabled = true) { bScopeEnabled = true; } |