diff options
author | chai <215380520@qq.com> | 2024-04-03 22:51:42 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2024-04-03 22:51:42 +0800 |
commit | 7365df818973a24bd29aeb725f6113f0a82cb9c6 (patch) | |
tree | 6b6337b2cb19ddc48ff72714f38d9801e6d8ed3b | |
parent | 438815d06178dceff4ca704bb5aeedf2bb6bb4d1 (diff) |
*scope
-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; } |