             desc.level = Int(level)!
         }
         if let slice = elem.valueForAttribute("slice") as? String {
-            desc.level = Int(slice)!
+            desc.slice = Int(slice)!
         }
         if let depthPlane = elem.valueForAttribute("depth-plane") as? String {
-            desc.level = Int(depthPlane)!
+            desc.depthPlane = Int(depthPlane)!
         }
         
         //TODO: resolveTexture & ref
         
         if let resolveLevel = elem.valueForAttribute("resolve-level") as? String {
-            desc.level = Int(resolveLevel)!
+            desc.resolveLevel = Int(resolveLevel)!
         }
         if let resolveSlice = elem.valueForAttribute("resolve-slice") as? String {
-            desc.level = Int(resolveSlice)!
+            desc.resolveSlice = Int(resolveSlice)!
         }
         if let resolveDepthPlane = elem.valueForAttribute("resolve-depth-plane") as? String {
-            desc.level = Int(resolveDepthPlane)!
+            desc.resolveDepthPlane = Int(resolveDepthPlane)!
         }
         if let loadAction = elem.valueForAttribute("load-action") as? String {
             let mtlEnum = descriptorManager.mtlEnums["mtlLoadAction"]!


public class S3DXMLMTLRenderPassDescriptorNode: S3DXMLNodeParser {
    public typealias NodeType = MTLRenderPassDescriptor
    public func parse(descriptorManager: SpectraDescriptorManager, elem: ONOXMLElement, options: [String : AnyObject]) -> NodeType {
        let desc = NodeType()
        
        //TODO: color attachment array

        if let _ = elem.valueForAttribute("blending-enabled") as? String {
            desc.blendingEnabled = true
        }
        if let sourceRgbBlendFactor = elem.valueForAttribute("source-rgb-blend-factor") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlBlendFactor"]!
            let enumVal = UInt(mtlEnum.getValue(sourceRgbBlendFactor))
            desc.sourceRGBBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let destRgbBlendFactor = elem.valueForAttribute("destination-rgb-blend-factor") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlBlendFactor"]!
            let enumVal = UInt(mtlEnum.getValue(destRgbBlendFactor))
            desc.destinationRGBBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let rgbBlendOp = elem.valueForAttribute("rgb-blend-operation") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlBlendOperation"]!
            let enumVal = UInt(mtlEnum.getValue(rgbBlendOp))
            desc.rgbBlendOperation = MTLBlendOperation(rawValue: enumVal)!
        }
        if let sourceAlphaBlendFactor = elem.valueForAttribute("source-alpha-blend-factor") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlBlendFactor"]!
            let enumVal = UInt(mtlEnum.getValue(sourceAlphaBlendFactor))
            desc.sourceAlphaBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let destAlphaBlendFactor = elem.valueForAttribute("destination-alpha-blend-factor") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlBlendFactor"]!
            let enumVal = UInt(mtlEnum.getValue(destAlphaBlendFactor))
            desc.destinationAlphaBlendFactor = MTLBlendFactor(rawValue: enumVal)!
        }
        if let alphaBlendOp = elem.valueForAttribute("alpha-blend-operation") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlBlendOperation"]!
            let enumVal = UInt(mtlEnum.getValue(alphaBlendOp))
            desc.alphaBlendOperation = MTLBlendOperation(rawValue: enumVal)!
