Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
            }
        }