         }
     }
     
-    func prepareBufferPool(device: MTLDevice, bytecount: Int, options: MTLResourceOptions = .CPUCacheModeDefaultCache, createWith: (Self) -> Buffer) {
+    func prepareBufferPool(device: MTLDevice, bytecount: Int, options: MTLResourceOptions = .CPUCacheModeDefaultCache, createWith: (Self) -> EncodableBuffer) {
         buffersSemaphore = dispatch_semaphore_create(buffersCount)
         for _ in 0...buffersCount-1 {
             let buffer = createBuffer(device, bytecount: self.bytecount, options: options, createWith: createWith)

        return buffer
    }
    
    func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions) -> Buffer {
        let thisBuffer = BaseBuffer()
        thisBuffer.bytecount = self.bytecount
        thisBuffer.prepareBuffer(device, options: options)
        return thisBuffer
    }
    
    func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions, createWith: (Self) -> Buffer) -> Buffer {
        return createWith(self)
    }
}

        
    }
    
    func prepareBufferPool(device:MTLDevice, bytecount:Int, options:MTLResourceOptions, createWith: (SingleBufferPool) -> EncodableBuffer) {
        
    }
    
