IDirect3DDevice9::SetIndices 方法 (d3d9helper.h)

設定索引資料。

語法

HRESULT SetIndices(
  [in] IDirect3DIndexBuffer9 *pIndexData
);

參數

[in] pIndexData

類型: IDirect3DIndexBuffer9*

IDirect3DIndexBuffer9介面的指標,代表要設定的索引資料。

傳回值

類型: HRESULT

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

備註

當應用程式不再保存此介面的參考時,會自動釋放介面。

IDirect3DDevice9::SetIndices方法會將目前的索引陣列設定為索引緩衝區。 單一索引集是用來編制所有資料流程的索引。

需求

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

另請參閱

IDirect3DDevice9

IDirect3DDevice9::DrawIndexedPrimitive

IDirect3DDevice9::DrawIndexedPrimitiveUP

IDirect3DDevice9::DrawPrimitive

IDirect3DDevice9::DrawPrimitiveUP

IDirect3DDevice9::GetIndices

(Direct3D 9) 索引緩衝區