D3DImage.IsFrontBufferAvailable 속성

정의

프런트 버퍼가 있는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool IsFrontBufferAvailable { bool get(); };
public bool IsFrontBufferAvailable { get; }
member this.IsFrontBufferAvailable : bool
Public ReadOnly Property IsFrontBufferAvailable As Boolean

속성 값

프런트 버퍼가 있으면 true이고, 그렇지 않으면 false입니다.

예제

다음 코드 예제에서는 검사 하는 IsFrontBufferAvailable 방법을 보여 있습니다는 컴퍼지션 대상을 렌더링할 때 속성입니다. 자세한 내용은 연습: WPF에서 Direct3D9 콘텐츠 호스팅합니다.

void CompositionTarget_Rendering(object sender, EventArgs e)
{
    RenderingEventArgs args = (RenderingEventArgs)e;

    // It's possible for Rendering to call back twice in the same frame 
    // so only render when we haven't already rendered in this frame.
    if (d3dimg.IsFrontBufferAvailable && _lastRender != args.RenderingTime)
    {
        IntPtr pSurface = IntPtr.Zero;
        HRESULT.Check(GetBackBufferNoRef(out pSurface));
        if (pSurface != IntPtr.Zero)
        {
            d3dimg.Lock();
            // Repeatedly calling SetBackBuffer with the same IntPtr is 
            // a no-op. There is no performance penalty.
            d3dimg.SetBackBuffer(D3DResourceType.IDirect3DSurface9, pSurface);
            HRESULT.Check(Render());
            d3dimg.AddDirtyRect(new Int32Rect(0, 0, d3dimg.PixelWidth, d3dimg.PixelHeight));
            d3dimg.Unlock();

            _lastRender = args.RenderingTime;
        }
    }
}

설명

경우에 따라 프런트 버퍼를 사용할 수 없게 됩니다. 화면 잠금, Direct3D 애플리케이션을 제외 하는 전체 화면, 사용자 전환 또는 기타 시스템 활동과이 부족 한 가용성을 발생할 수 있습니다. WPF 애플리케이션을 처리 하 여 알려집니다 이런 경우는 IsFrontBufferAvailableChanged 이벤트입니다. 애플리케이션이 사용할 수 없게 되는 프런트 버퍼가에 반응 하는 방법을 소프트웨어 렌더링으로 대체 WPF 사용 여부에 따라 달라 집니다. 이 SetBackBuffer 메서드에는 WPF가 소프트웨어 렌더링으로 대체되는지 여부를 지정하는 매개 변수를 사용하는 오버로드가 있습니다. 자세한 내용은 D3DImage 클래스의 설명을 참조하세요.

종속성 속성 정보

식별자 필드 IsFrontBufferAvailableProperty
메타 데이터 속성 설정 true 없음

적용 대상

추가 정보