/// <summary> /// The first method called when the IFrameworkView is being created. /// Use this method to subscribe for Windows shell events and to initialize your app. /// </summary> public void Initialize(CoreApplicationView applicationView) { applicationView.Activated += this.OnViewActivated; // Register event handlers for app lifecycle. CoreApplication.Suspending += this.OnSuspending; CoreApplication.Resuming += this.OnResuming; // At this point we have access to the device and we can create device-dependent // resources. deviceResources = new DeviceResources(); main = new HolographicGeometryShaderMain(deviceResources); }
public void Dispose() { if (deviceResources != null) { deviceResources.Dispose(); deviceResources = null; } if (main != null) { main.Dispose(); main = null; } }