ID3DXBuffer Interface

 

 

' ****************************************************************************************
' ID3DXBuffer interface
' $IID_ID3DXBuffer = GUID$("{8BA5FB08-5195-40e2-AC58-0D989C3A0102}")
' ****************************************************************************************

' ****************************************************************************************
' The ID3DXBuffer interface is used as a data buffer, storing vertex, adjacency, and material
' information during mesh optimization and loading operations. The buffer object is used to
' return arbitrary length data. Also, buffer objects are used to return object code and error
' messages in methods that assemble vertex and pixel shaders.
' Remarks
'    The ID3DXBuffer interface is obtained by calling the D3DXCreateBuffer function.
' Interface Information
'    Stock Implementation   d3d9.dll
'    Custom Implementation  No
'    Inherits from  IUnknown
'    Header     d3dx9core.h
'    Import library     d3dx9.lib
'    Minimum operating systems  Windows 98
' ****************************************************************************************

' ****************************************************************************************
'DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
'{
'    // IUnknown
'  0.  STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
'  1.  STDMETHOD_(ULONG, AddRef)(THIS) PURE;
'  2.  STDMETHOD_(ULONG, Release)(THIS) PURE;

'    // ID3DXBuffer
'  3.  STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
'  4.  STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
'};
' ****************************************************************************************

' ****************************************************************************************
' GetBufferPointer method
' Retrieves a pointer to the data in the buffer.
' LPVOID GetBufferPointer();
' ****************************************************************************************
FUNCTION ID3DXBuffer_GetBufferPointer ALIAS "ID3DXBuffer_GetBufferPointer" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD

    LOCAL DWRESULT AS DWORD
    IF pthis = %NULL THEN EXIT FUNCTION
    CALL DWORD @@pthis[3] USING ID3DXBuffer_GetBufferPointer(pthis) TO DWRESULT
    FUNCTION = DWRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' GetBufferSize method
' Retrieves the total size of the data in the buffer.
' DWORD GetBufferSize();
' ****************************************************************************************
FUNCTION ID3DXBuffer_GetBufferSize ALIAS "ID3DXBuffer_GetBufferSize" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD

    LOCAL DWRESULT AS DWORD
    IF pthis = %NULL THEN EXIT FUNCTION
    CALL DWORD @@pthis[4] USING ID3DXBuffer_GetBufferSize(pthis) TO DWRESULT
    FUNCTION = DWRESULT

END FUNCTION
' ****************************************************************************************
 

 

Page last updated on Tuesday, 14 March 2006 22:18:37 +0100