     func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions, createWith: (Self) -> EncodableBuffer) -> EncodableBuffer {
         return createWith(self)
     }
+    
+    func getBuffer() -> EncodableBuffer {
+        var buffer = buffers[buffersIndex]
+        buffersIndex = (buffersIndex + 1) % buffersCount
+        
+        // return the buffer unmodified and let the user determine how to write to it
+        return buffer
+    }
+    
+    func getBuffer(bufferIndex: Int) -> EncodableBuffer {
+        return buffers[bufferIndex]
+    }
 }
 
 class BaseBufferPool: BufferPool {


import Metal

let inflightBuffersCountDefault = 3 // three is magic number

// N.B. planning on always accessing Buffer via BufferProvider (and MTLBuffer via Buffer)
// - so that interface is consistent and so that stuff can easily be built on top of one thing


    var bytecount:Int { get set }
    var buffersCount:Int { get set }
    var buffersIndex:Int { get set }
    var buffers: [EncodableBuffer] { get set } // private
    
    // N.B. must deinit resources!
