Skip to content

Commit

Permalink
fixed RenderObject ids (now simply using newId from Aardvark.Base.Inc…
Browse files Browse the repository at this point in the history
…remental)
  • Loading branch information
krauthaufen committed Oct 17, 2019
1 parent 331c362 commit 6e00c78
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Aardvark.Base.Rendering/RenderObject.fs
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ type UniformProvider private() =




module private RenderObjectIds =
open System.Threading
let mutable private currentId = 0
let newId() = Interlocked.Increment &currentId

[<AutoOpen>]
module private RenderObjectHelpers =
let private nopDisposable = { new IDisposable with member x.Dispose() = () }
Expand Down Expand Up @@ -278,7 +272,7 @@ type RenderObject =
else x.AttributeScope.Path

static member Create() =
{ Id = RenderObjectIds.newId()
{ Id = newId()
AttributeScope = Ag.emptyScope
IsActive = null
RenderPass = RenderPass.main
Expand All @@ -305,7 +299,7 @@ type RenderObject =
}

static member Clone(org : RenderObject) =
{ org with Id = RenderObjectIds.newId() }
{ org with Id = newId() }

override x.GetHashCode() = x.Id
override x.Equals o =
Expand Down

0 comments on commit 6e00c78

Please sign in to comment.