         scene!.pipelineStateMap = pipelineStateMap
     }
     
-}+}
+
+//    static let renderFunctionMap: Spectra.RenderPipelineFunctionMap = [
+//        "basic": ("basicColorVertex", "basicColorFragment"),
+//        "colorShift": ("basicColorShiftedVertex", "basicColorFragment"),
+//        "colorShiftContinuous": ("basicColorShiftedContinuousVertex", "basicColorFragment")
+//    ]
+
+//    func loadPipelineStateMap() {
+//        let pipelineGenerator = Spectra.RenderPipelineGenerator(library: spectraView.defaultLibrary)
+//        pipelineStateMap = pipelineGenerator.generatePipelineMap(spectraView.device!, functionMap: CubeViewController.renderFunctionMap, setupDescriptor: { (desc) in
+//            desc.colorAttachments[0].pixelFormat = .BGRA8Unorm
+//            desc.vertexDescriptor = self.vertexDescriptorMap["common"]
+//            return desc
+//        })
+//    }
    
    @IBOutlet weak var spectraView: Spectra.BaseView! //TODO: weak?
    var scene: Spectra.Scene?
    
    // i wish i could more strongly constrain the keys for these maps
    // - but i can't create a protocol for enums 

//    }
    
    let cubeKey = "spectra_cube"
    var pipelineStateMap: Spectra.RenderPipelineStateMap = [:]
    var encodableDataMap: Spectra.SceneEncodableDataMap = [:]
    
    override func viewDidLoad() {
        super.viewDidLoad()
        stateMan = Spectra.SpectraStateManager()
        loadDescriptorManager()
        loadRenderPipelineStates()
        
        scene = Spectra.Scene()
        setupPerspective()
