                     let transform = SpectraXMLTransformNode().parse(container, elem: child, options: options)
                     container.register(MDLTransform.self, name: key!) { _ in
                         return SpectraXMLTransformNode.copy(transform)
+                    }.inObjectScope(.None)
+                case .Texture:
+                    let textureNode = TextureNode()
+                    textureNode.parseXML(container, elem: child, options: options)
+                    let textureGen = container.resolve(TextureGenerator.self, name: key!)!
+                    let texture = textureGen.generate(container, args: textureNode.args)
+                    container.register(MDLTexture.self, name: key!) { _ in
+                        // don't copy texture
+                        return texture
                     }
+                case .TextureGenerator:
+                    let texGenNode = TextureGeneratorNode()
+                    texGenNode.parseXML(container, elem: child, options: options)
+                    let texGen = texGenNode.createGenerator(container, options: options)
+                    container.register(TextureGenerator.self, name: key!) { _ in
+                        return texGen.copy(container)
+                        }.inObjectScope(.None)
                 case .TextureFilter:
                     let textureFilter = SpectraXMLTextureFilterNode().parse(container, elem: child, options: options)
                     container.register(MDLTextureFilter.self, name: key!) { _ in

    }
    
    public func createGenerator(container: Container, options: [String : Any] = [:]) -> MeshGenerator {
        
        let meshGen = container.resolve(MeshGenerator.self, name: self.type)!
        meshGen.processArgs(container, args: self.args)
        return meshGen
    }
}


    case MaterialProperty = "material-property"
    case ScatteringFunction = "scattering-function"
    case Texture = "texture"
    case TextureGenerator = "texture-generator"
    case TextureFilter = "texture-filter"
    case TextureSampler = "texture-sampler"
    case Light = "light"
    case LightGenerator = "light-generator"
    
    // TODO: reimplement nodeParser() once auto-injection is available in Swinject
    // - until then, I really can't resolve the type
