         self.computeFunction = computeFunction
     }
     
-
+    //remove optional return and instead throw errors on program/pipeline load failures
     func generate(device:MTLDevice) -> MTLComputePipelineState? {
         guard let computeProgram = library.newFunctionWithName(computeFunction) else {
             print("Couldn't load \(computeFunction)")

        self.fragmentFunction = fragmentFunction
    }
    
    func generate(device: MTLDevice, setupDescriptor: ((inout MTLRenderPipelineDescriptor) -> Void)? = nil) -> MTLRenderPipelineState? {
        
        guard let vertexProgram = library.newFunctionWithName(vertexFunction) else {
            print("Couldn't load \(vertexFunction)")
            return nil

//TODO: ComputePipelineMap
//TODO: DepthStencilStateMap

//TODO: generators for DepthStencilState & SamplerState

class RenderPipelineGenerator {
    var library: MTLLibrary
    var vertexFunction: String
