Skip to content

Commit

Permalink
Remove obsolete EffectDebugger API
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Jul 4, 2023
1 parent a0f1b6c commit 26951e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion src/Libs/FShade.Core/FShade.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<Compile Include="EffectInputLayout.fs" />
<Compile Include="Effect.fs" />
<Compile Include="ComputeShader.fs" />
<Compile Include="EffectDebugger.fs" />
<Compile Include="ShaderDebugger.fs" />
<Compile Include="TopLevelOperators.fs" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ open Aardvark.Base

#nowarn "44"

[<Obsolete("Use ShaderDebugger instead.")>]
module EffectDebugger =

let mutable isAttached = false

// Effect -> IMod<Effect>
let mutable registerFun : Option<Effect -> 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 =
Expand All @@ -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()
)
}
Expand Down

0 comments on commit 26951e7

Please sign in to comment.