         let vertexAttrDesc = MTLVertexAttributeDescriptor()
         
         if let format = elem.attributes["format"] {
-            let mtlEnum = descriptorManager.mtlEnums["mtlVertexFormat"]!
-            let enumVal = UInt(mtlEnum.getValue(format))
+            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlVertexFormat")!
+            let enumVal = mtlEnum.getValue(format)
             vertexAttrDesc.format = MTLVertexFormat(rawValue: enumVal)!
         }
         if let offset = elem.attributes["offset"] {

        //TODO: resourceOptions is option set type
        // texDesc.resourceOptions?  optional?  set later?
        if let cpuCacheMode = elem.attributes["cpu-cache-mode"] {
            let mtlEnum = descriptorManager.mtlEnums["mtlCpuCacheMode"]!
            let enumVal = UInt(mtlEnum.getValue(cpuCacheMode))
            texDesc.cpuCacheMode = MTLCPUCacheMode(rawValue: enumVal)!
        }
        if let storageMode = elem.attributes["storage-mode"] {
            let mtlEnum = descriptorManager.mtlEnums["mtlStorageMode"]!
            let enumVal = UInt(mtlEnum.getValue(storageMode))
            texDesc.storageMode = MTLStorageMode(rawValue: enumVal)!
        }
//        if let usage = elem.valueForAttribute("usage") as? String {

        let desc = MTLRenderPipelineColorAttachmentDescriptor()
        
        if let pixelFormat = elem.attributes["pixel-format"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlPixelFormat")!
            let enumVal = mtlEnum.getValue(pixelFormat)
            desc.pixelFormat = MTLPixelFormat(rawValue: enumVal)!
        }
        if let _ = elem.attributes["blending-enabled"] {
            desc.blendingEnabled = true
        }
        if let sourceRgbBlendFactor = elem.attributes["source-rgb-blend-factor"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlBlendFactor")!
            let enumVal = mtlEnum.getValue(sourceRgbBlendFactor)
            desc.sourceRGBBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let destRgbBlendFactor = elem.attributes["destination-rgb-blend-factor"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlBlendFactor")!
            let enumVal = mtlEnum.getValue(destRgbBlendFactor)
            desc.destinationRGBBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let rgbBlendOp = elem.attributes["rgb-blend-operation"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlBlendOperation")!
            let enumVal = mtlEnum.getValue(rgbBlendOp)
            desc.rgbBlendOperation = MTLBlendOperation(rawValue: enumVal)!
        }
        if let sourceAlphaBlendFactor = elem.attributes["source-alpha-blend-factor"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlBlendFactor")!
            let enumVal = mtlEnum.getValue(sourceAlphaBlendFactor)
            desc.sourceAlphaBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let destAlphaBlendFactor = elem.attributes["destination-alpha-blend-factor"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlBlendFactor")!
            let enumVal = mtlEnum.getValue(destAlphaBlendFactor)
            desc.destinationAlphaBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let alphaBlendOp = elem.attributes["alpha-blend-operation"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlBlendOperation")!
            let enumVal = mtlEnum.getValue(alphaBlendOp)
            desc.alphaBlendOperation = MTLBlendOperation(rawValue: enumVal)!
        }
        //TODO: writeMask
