D3DResourceType 枚举

定义

指定与 D3DImage 类兼容的 Direct3D 图面类型。Specifies the Direct3D surface types that are compatible with the D3DImage class.

public enum class D3DResourceType
public enum D3DResourceType
type D3DResourceType = 
Public Enum D3DResourceType
继承
D3DResourceType

字段

IDirect3DSurface9 0

指定 IDirect3DSurface9 图面。Specifies an IDirect3DSurface9 surface.

示例

下面的代码示例演示如何D3DResourceType在调用SetBackBuffer方法时指定。The following code example shows how to specify the D3DResourceType in a call to the SetBackBuffer method. 有关详细信息,请参见演练:在 WPF中承载 Direct3D9 内容。For more information, see Walkthrough: Hosting Direct3D9 Content in WPF.

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();

注解

在方法中分配 Direct3D surface时使用。D3DResourceType D3DImage.SetBackBufferUse the D3DResourceType when you assign a Direct3D surface in the D3DImage.SetBackBuffer method.

适用于

另请参阅