         
         self._arView = view
         self._presentationFrame = view.bounds
-
+        
         #if !( targetEnvironment(simulator) )
         self._device = view.device
         self._renderer = SCNRenderer(device: view.device, options: nil)
         self._renderer?.scene = view.scene
+        self._renderer?.autoenablesDefaultLighting = self.autoenablesDefaultLighting
         #endif
         
+        self._commandQueue = view.device?.makeCommandQueue()
+        self._renderPassDescriptor = MTLRenderPassDescriptor()
     }
     #endif
     

        }
    }
    
    // MARK: - ivars
    
    internal var _device: MTLDevice?

            
            self._renderer?.scene = scene
            self._renderer?.pointOfView = pointOfView
            self._renderer?.render(atTime: time, viewport: viewport, commandBuffer: commandBuffer, passDescriptor: renderPassDescriptor)
            
            commandBuffer.commit()
