anchor.diff:              run locks ()
   
           let resize (newCapacity : nativeint) =
  -            if nativeint newCapacity <> buffer.SizeInBytes then
  -                let copySize = min buffer.SizeInBytes newCapacity
  -
  -                let oldBuffer = buffer.Handle
  -                let newBuffer = GL.GenBuffer()
  -                GL.Check "[MappedBuffer] could not create buffer"
  -            
  -                if buffer.Handle <> 0 then
  -                    GL.BindBuffer(BufferTarget.CopyReadBuffer, buffer.Handle)
  -                    GL.Check "[MappedBuffer] could not bind old buffer"
  -
  -                GL.BindBuffer(BufferTarget.CopyWriteBuffer, newBuffer)
  -                GL.Check "[MappedBuffer] could not bind new buffer"
  -
  -
  -                if newCapacity > 0n then
  -                    GL.BufferData(BufferTarget.CopyWriteBuffer, newCapacity, 0n, BufferUsageHint.DynamicDraw)
  -                    GL.Check "[MappedBuffer] could not set buffer storage"
  -
  -                    if oldBuffer <> 0 then
  -                        if copySize > 0n then
  -                            GL.CopyBufferSubData(BufferTarget.CopyReadBuffer, BufferTarget.CopyWriteBuffer, 0n, 0n, copySize)
  -                            GL.Check "[MappedBuffer] could not copy buffer"
  -
  -                        GL.BindBuffer(BufferTarget.CopyReadBuffer, 0)
  -                        GL.Check "[MappedBuffer] could unbind old buffer"
  -
  -                    buffer <- Buffer(ctx, nativeint newCapacity, newBuffer)
  -                else
  -                    buffer <- Buffer(ctx, 0n, 0)
  -
  -                GL.BindBuffer(BufferTarget.CopyWriteBuffer, 0)
  -                GL.Check "[MappedBuffer] could unbind buffer"
  -
  -
  -                if oldBuffer <> 0 then
  -                    Interlocked.Change(&oldBuffers, fun o -> oldBuffer::o) |> ignore
  -
  -                true
  -            else false
  -
  -        let deleteOldBuffers () =
  -            let delete = Interlocked.Exchange(&oldBuffers, [])
  -            if not (List.isEmpty delete) then
  -                using ctx.ResourceLock (fun _ ->
  -                    for d in delete do 
  -                        GL.DeleteBuffer(d) 
  -                        GL.Check "[MappedBuffer] could delete old buffer"
  -                )
  -
  -        member x.Write(sourcePtr : IntPtr, offset : nativeint, size : nativeint) =   
  +            buffer.Resize(newCapacity)
  +            false
  +
  +        member x.Write(sourcePtr : IntPtr, offset : nativeint, size : nativeint) = 
               resourceLocked (fun () -> 
                   if size + offset > buffer.SizeInBytes then failwith "insufficient buffer size"
   
  
positive.code:             member x.Use (f : unit -> 'a) = x.Use f
              member x.AddLock (r : RenderTaskLock) = x.AddLock r
              member x.RemoveLock (r : RenderTaskLock) = x.RemoveLock r
  
  
  
  [<AutoOpen>]
  
negative.code: 
  
          override x.Compute() =
              buffer :> IBuffer
  
          member x.Dispose() =
  