From 26951e7ddc3a57dfabbb937a63840ff90ad12408 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 4 Jul 2023 12:20:21 +0200 Subject: [PATCH] Remove obsolete EffectDebugger API --- src/Libs/FShade.Core/FShade.Core.fsproj | 2 +- .../{EffectDebugger.fs => ShaderDebugger.fs} | 25 ------------------- 2 files changed, 1 insertion(+), 26 deletions(-) rename src/Libs/FShade.Core/{EffectDebugger.fs => ShaderDebugger.fs} (67%) diff --git a/src/Libs/FShade.Core/FShade.Core.fsproj b/src/Libs/FShade.Core/FShade.Core.fsproj index c183129..4961589 100644 --- a/src/Libs/FShade.Core/FShade.Core.fsproj +++ b/src/Libs/FShade.Core/FShade.Core.fsproj @@ -33,7 +33,7 @@ - + diff --git a/src/Libs/FShade.Core/EffectDebugger.fs b/src/Libs/FShade.Core/ShaderDebugger.fs similarity index 67% rename from src/Libs/FShade.Core/EffectDebugger.fs rename to src/Libs/FShade.Core/ShaderDebugger.fs index 4a01815..94bb240 100644 --- a/src/Libs/FShade.Core/EffectDebugger.fs +++ b/src/Libs/FShade.Core/ShaderDebugger.fs @@ -6,20 +6,6 @@ open Aardvark.Base #nowarn "44" -[] -module EffectDebugger = - - let mutable isAttached = false - - // Effect -> IMod - let mutable registerFun : Option obj> = None - let mutable saveCode : Effect -> string -> unit = fun _ _ -> () - - let register (e : Effect) = - match registerFun with - | Some f -> Some (f e) - | _ -> None - module ShaderDebugger = type IShaderDebugger = @@ -39,21 +25,10 @@ module ShaderDebugger = let inst = f() instance <- Some inst - EffectDebugger.isAttached <- true - EffectDebugger.registerFun <- - Some ( - fun effect -> - match inst.TryRegisterEffect effect with - | Some res -> res :> obj - | _ -> AVal.constant effect :> obj - ) - { new IDisposable with member x.Dispose() = lock lockObj (fun _ -> instance <- None - EffectDebugger.isAttached <- false - EffectDebugger.registerFun <- None inst.Dispose() ) }