public void Shutdown() { // Release the light object. Light = null; // Release the camera object. Camera = null; // Release the Second Cube model object. CubeModel2?.Shutdown(); CubeModel2 = null; // Release the Third Cube model object. CubeBumpMapModel3?.Shutdown(); CubeBumpMapModel3 = null; // Release the First cube model object. CubeModel1?.Shutdown(); CubeModel1 = null; // Release the shader manager object. ShaderManager?.ShutDown(); ShaderManager = null; // Release the Direct3D object. D3D?.ShutDown(); D3D = null; }