IDirect3DDevice9::CreateVertexDeclaration 方法 (d3d9helper.h)

從裝置和頂點元素建立頂點著色器宣告。

語法

HRESULT CreateVertexDeclaration(
  [in]          const D3DVERTEXELEMENT9     *pVertexElements,
  [out, retval] IDirect3DVertexDeclaration9 **ppDecl
);

參數

[in] pVertexElements

類型: const D3DVERTEXELEMENT9*

D3DVERTEXELEMENT9頂點元素的陣列。

[out, retval] ppDecl

類型: IDirect3DVertexDeclaration9**

傳回所建立頂點著色器宣告之 IDirect3DVertexDeclaration9 指標的指標。

傳回值

類型: HRESULT

如果方法成功,傳回值會D3D_OK。 如果方法失敗,則傳回值可以D3DERR_INVALIDCALL。

備註

如需如何在不同 DirectX 版本之間對應頂點宣告的詳細描述,請參閱 頂點宣告 (Direct3D 9) 頁面。

規格需求

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

另請參閱

IDirect3DDevice9