Share via


IDirect3DDevice9::GetDepthStencilSurface 方法 (d3d9helper.h)

取得 Direct3DDevice 物件所擁有的深度樣板表面。

語法

HRESULT GetDepthStencilSurface(
  [out, retval] IDirect3DSurface9 **ppZStencilSurface
);

參數

[out, retval] ppZStencilSurface

類型: IDirect3DSurface9**

IDirect3DSurface9介面指標的位址,代表傳回的深度樣板表面。

傳回值

類型: HRESULT

如果方法成功,傳回值會D3D_OK。如果裝置沒有與其相關聯的深度樣板緩衝區,則會D3DERR_NOTFOUND傳回值。 否則,如果方法失敗,則可以D3DERR_INVALIDCALL傳回值。

備註

呼叫這個方法將會增加 IDirect3DSurface9 介面上的內部參考計數。 使用此IDirect3DSurface9介面完成時,無法呼叫IUnknown::Release會導致記憶體流失。

需求

   
目標平台 Windows
標頭 d3d9helper.h (包含 D3D9.h)
程式庫 D3D9.lib

另請參閱

IDirect3DDevice9

IDirect3DDevice9::SetDepthStencilSurface