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

    var buffersCount:Int
    var buffersIndex:Int = 0
    var buffersSemaphore:dispatch_semaphore_t?
    internal var buffers: [Buffer] = []
    
    required init(device: MTLDevice, bytecount: Int, buffersCount: Int = inflightBuffersCountDefault, options: MTLResourceOptions = .CPUCacheModeDefaultCache) {
        self.bytecount = bytecount

    //
    //    }
    
    func getBuffer() -> EncodableBuffer {
        return buffers.first!
    }
    
