 //    }
     
     let cubeKey = "spectra_cube"
-    
     var pipelineStateMap: Spectra.RenderPipelineStateMap = [:]
-    var depthStencilStateMap: Spectra.DepthStencilStateMap = [:]
-    var vertexDescriptorMap: Spectra.VertexDescriptorMap = [:]
-    static let renderFunctionMap: Spectra.RenderPipelineFunctionMap = [
-        "basic": ("basicColorVertex", "basicColorFragment"),
-        "colorShift": ("basicColorShiftedVertex", "basicColorFragment"),
-        "colorShiftContinuous": ("basicColorShiftedContinuousVertex", "basicColorFragment")
-    ]
-    
     var encodableDataMap: Spectra.SceneEncodableDataMap = [:]
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        loadVertexDescriptorMap()
-        loadPipelineStateMap()
-        loadDepthStencilMap()
+        stateMan = Spectra.SpectraStateManager()
+        loadDescriptorManager()
+        loadRenderPipelineStates()
         
         scene = Spectra.Scene()
         setupPerspective()

    
    @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 

    }
    
    func setupObjects() {
// parse Cube.XML
//        let cubeXml = try! xml["root"]["mesh"].withAttr("id", cubeKey)
//        setupCube(cubeKey, xml: cubeXml)
    }
