void Window_Loaded(object sender, RoutedEventArgs e) { D3DImageContainer = new D3DImageSlimDX(); D3DImageContainer.IsFrontBufferAvailableChanged += OnIsFrontBufferAvailableChanged; SlimDXImage.Source = D3DImageContainer; D3DScene = new Scene(); SlimDX.Direct3D10.Texture2D Texture = D3DScene.SharedTexture; D3DImageContainer.SetBackBufferSlimDX(Texture); BeginRenderingScene(); }
void BeginRenderingScene() { if (D3DImageContainer.IsFrontBufferAvailable) { foreach (var item in SlimDX.ObjectTable.Objects) { } SlimDX.Direct3D10.Texture2D Texture = D3DScene.SharedTexture; D3DImageContainer.SetBackBufferSlimDX(Texture); CompositionTarget.Rendering += OnRendering; Timer.Start(); } }