|
|
|
IDirect3DIndexBuffer9 Interface |
|
' ****************************************************************************************
' IDirect3DIndexBuffer9 interface
' IID_Direct3DIndexBuffer9 = GUID$("{7C9DD65E-D3F7-4529-ACEE-785830ACDE35}")
' ****************************************************************************************
' ****************************************************************************************
' Applications use the methods of the IDirect3DIndexBuffer9 interface to manipulate an index
' buffer resource.
' The IDirect3DIndexBuffer9 interface is obtained by calling the IDirect3DDevice9::CreateIndexBuffer method.
' This interface inherits additional functionality from the IDirect3DResource9 interface.
' Interface Information
' Stock Implementation d3d9.dll
' Custom Implementation No
' Inherits from IDirect3DResource9
' Header d3d9.h
' Import library d3d9.lib
' Minimum operating systems Windows 98
' ****************************************************************************************
' ****************************************************************************************
'DECLARE_INTERFACE_(IDirect3DIndexBuffer9, IDirect3DResource9)
'{
' /*** IUnknown methods ***/
' 0. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE;
' 1. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
' 2. STDMETHOD_(ULONG,Release)(THIS) PURE;
' /*** IDirect3DResource9 methods ***/
' 3. STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE;
' 4. STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE;
' 5. STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE;
' 6. STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
' 7. STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
' 8. STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
' 9. STDMETHOD_(void, PreLoad)(THIS) PURE;
' 10. STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
' /*** IDirect3DIndexBuffer9 methods ***/
' 11. STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,void** ppbData,DWORD Flags) PURE;
' 12. STDMETHOD(Unlock)(THIS) PURE;
' 13. STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC *pDesc) PURE;
'};
' ****************************************************************************************
' ****************************************************************************************
' Lock method
' Locks a range of index data and obtains a pointer to the index buffer memory.
' HRESULT Lock(
' UINT OffsetToLock,
' UINT SizeToLock,
' VOID ** ppbData,
' DWORD Flags
' );
' ****************************************************************************************
FUNCTION IDirect3DIndexBuffer9_Lock ALIAS "IDirect3DIndexBuffer9_Lock" ( _
BYVAL pthis AS DWORD PTR, BYVAL OffsetToLock AS DWORD, BYVAL SizeToLock AS DWORD, _
BYREF ppbData AS DWORD, BYVAL Flags AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[11] USING IDirect3DIndexBuffer9_Lock(pthis, OffsetToLock, SizeToLock, ppbData, Flags) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Unlock method
' Unlocks index data.
' HRESULT Unlock();
' ****************************************************************************************
FUNCTION IDirect3DIndexBuffer9_Unlock ALIAS "IDirect3DIndexBuffer9_Unlock" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[12] USING IDirect3DIndexBuffer9_Unlock(pthis) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetDesc method
' Retrieves a description of the index buffer resource.
' HRESULT GetDesc(
' D3DINDEXBUFFER_DESC * pDesc
' );
' ****************************************************************************************
FUNCTION IDirect3DIndexBuffer9_GetDesc ALIAS "IDirect3DIndexBuffer9_GetDesc" ( _
BYVAL pthis AS DWORD PTR, BYREF pDesc AS D3DINDEXBUFFER_DESC) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[13] USING IDirect3DIndexBuffer9_GetDesc(pthis, pDesc) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
|
Page last updated on Tuesday, 14 March 2006 20:07:20 +0100