/// <summary> /// Application initialization /// </summary> public override void Initialize() { var graphicsDevice = new GraphicsDevice() { DeviceDirect3D = this.deviceResources.D3DDevice, ContextDirect3D = this.deviceResources.D3DDeviceContext, DxgiDeviceManager = this.deviceResources.DxgiDeviceManager }; this.Adapter = new Adapter.Adapter(this, graphicsDevice); this.adapter = this.Adapter as Adapter.Adapter; this.renderTargetManager = this.Adapter.Graphics.RenderTargetManager as RenderTargetManager; this.mixedRealityService = new MixedRealityService(this); Framework.Services.WaveServices.RegisterService(this.mixedRealityService); Framework.Services.WaveServices.RegisterService(new SpatialInputService()); this.eyesProperties = new VREye[3]; for (int i = 0; i < 3; i++) { this.eyesProperties[i] = new VREye(); } this.backBufferHandles = new Dictionary <int, VREyeTexture[]>(); }
/// <summary> /// Allows to execute custom logic during the initialization of this instance. /// </summary> /// <exception cref="System.Exception">Invalid configure rendering</exception> protected override void Initialize() { base.Initialize(); this.mixedRealityService = WaveServices.GetService <MixedRealityService>(); this.spatialInputService = WaveServices.GetService <SpatialInputService>(); }