public void SetWindow(CoreWindow window) { // At this point we have access to the device and we can create device-dependent // resources. // Create app application = new MainApplication() { IsLowProfile = true }; // Create Services xrDevice = new MixedRealityPlatform(); application.Container.RegisterInstance(xrDevice); windowsSystem = new MixedRealityWindowsSystem(window); application.Container.RegisterInstance(windowsSystem); application.Container.RegisterInstance(new VoiceCommandService()); ConfigureGraphicsContext(application); // Creates XAudio device var xaudio = new Evergine.XAudio2.XAudioDevice(); application.Container.RegisterInstance(xaudio); }
public void SetWindow(CoreWindow window) { // Create Services xrDevice = new MixedRealityPlatform(); application.Container.RegisterInstance(xrDevice); windowsSystem = new MixedRealityWindowsSystem(window); application.Container.RegisterInstance(windowsSystem); ConfigureGraphicsContext(application); // Creates XAudio device /*var xaudio = new WaveEngine.XAudio2.XAudioDevice(); * application.Container.RegisterInstance(xaudio); * * application.Container.RegisterType<VoiceCommandService>(); * VoiceCommandService voiceCommandService = application.Container.Resolve<VoiceCommandService>(); * voiceCommandService.ConfigureWords(new string[] { * "select", "button" * });*/ }
private static void ConfigureMixedRealityDisplay(MyApplication application, MixedRealityPlatform xrDevice) { var graphicsPresenter = application.Container.Resolve <GraphicsPresenter>(); graphicsPresenter.AddDisplay("DefaultDisplay", xrDevice.Display); }