/// <summary> /// /// </summary> public DXElement() { this.SnapsToDevicePixels = true; m_renderTimer = new Stopwatch(); m_surface = new D3D9ImageSource(); m_surface.IsFrontBufferAvailableChanged += delegate { _needReset = true; UpdateReallyLoopRendering(); if (!m_isReallyLoopRendering && m_surface.IsFrontBufferAvailable) { Render(); } }; IsVisibleChanged += delegate { UpdateReallyLoopRendering(); }; Action Dispose = () => { IDisposable disposer = Renderer as IDisposable; if (disposer != null) { try { disposer.Dispose(); } catch { } } Renderer = null; }; //this.Unloaded += (s, ea) => Dispose(); this.Dispatcher.ShutdownStarted += (s, ea) => Dispose(); }
/// <summary> /// /// </summary> /// <param name="dximage"></param> public abstract void SetBackBuffer(D3D9ImageSource dximage);
/// <summary> /// /// </summary> /// <param name="dximage"></param> public override void SetBackBuffer(D3D9ImageSource dximage) { dximage.SetBackBuffer(RenderTarget); }