IDirect3DCubeTexture9 Interface

 

 

' ****************************************************************************************
' IDirect3DCubeTexture9 interface
' $IID_Direct3DCubeTexture9 = GUID$("{FFF32F81-D953-473a-9223-93D652ABA93F}")
' ****************************************************************************************

' ****************************************************************************************
' Applications use the methods of the IDirect3DCubeTexture9 interface to manipulate a cube
' texture resource.
' The IDirect3DCubeTexture9 interface can be obtained by calling the IDirect3DDevice9::CreateCubeTexture
' method or one of the D3DXCreateCubeTexturexxx functions.
' This interface inherits additional functionality from the IDirect3DBaseTexture9 interface.
' Interface Information
'    Stock Implementation   d3d9.dll
'    Custom Implementation  No
'    Inherits from  IDirect3DBaseTexture9
'    Header     d3d9.h
'    Import library     d3d9.lib
'    Minimum operating systems  Windows 98
' ****************************************************************************************

' ****************************************************************************************
'DECLARE_INTERFACE_(IDirect3DCubeTexture9, IDirect3DBaseTexture9)
'{
'    /*** 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;

'    /*** IDirect3DBaseTexture9 methods ***/

' 11.  STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
' 12.  STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
' 13.  STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE;
' 14.  STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE FilterType) PURE;
' 15.  STDMETHOD_(D3DTEXTUREFILTERTYPE, GetAutoGenFilterType)(THIS) PURE;
' 16.  STDMETHOD_(void, GenerateMipSubLevels)(THIS) PURE;

'    /*** IDirect3DCubeTexture9 methods ***/

' 17.  STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC *pDesc) PURE;
' 18.  STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level,IDirect3DSurface9** ppCubeMapSurface) PURE;
' 19.  STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE;
' 20.  STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level) PURE;
' 21.  STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect) PURE;
'};
' ****************************************************************************************

' ****************************************************************************************
' GetLevelDesc method
' Retrieves a description of one face of the specified cube texture level.
' HRESULT GetLevelDesc(
'   UINT Level,
'   D3DSURFACE_DESC * pDesc
' );
' ****************************************************************************************
FUNCTION IDirect3DCubeTexture9_GetLevelDesc ALIAS "IDirect3DCubeTexture9_GetLevelDesc" ( _
    BYVAL pthis AS DWORD PTR, BYVAL Level AS DWORD, BYREF pDesc AS D3DSURFACE_DESC) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[17] USING IDirect3DCubeTexture9_GetLevelDesc(pthis, Level, pDesc) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' GetCubeMapSurface method
' Retrieves a cube texture map surface.
' HRESULT GetCubeMapSurface(
'   D3DCUBEMAP_FACES FaceType,
'   UINT Level,
'   IDirect3DSurface9 ** ppCubeMapSurface
' );
' ****************************************************************************************
FUNCTION IDirect3DCubeTexture9_GetCubeMapSurface ALIAS "IDirect3DCubeTexture9_GetCubeMapSurface" ( _
    BYVAL pthis AS DWORD PTR, BYVAL FaceType AS DWORD, BYVAL Level AS DWORD, _
    BYREF ppCubeMapSurface AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[18] USING IDirect3DCubeTexture9_GetCubeMapSurface(pthis, FaceType, Level, ppCubeMapSurface) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' LockRect method
' Locks a rectangle on a cube texture resource.
' HRESULT LockRect(
'   D3DCUBEMAP_FACES FaceType,
'   UINT Level,
'   D3DLOCKED_RECT * pLockedRect,
'   CONST RECT * pRect,
'   DWORD Flags
' );
' ****************************************************************************************
FUNCTION IDirect3DCubeTexture9_LockRect ALIAS "IDirect3DCubeTexture9_LockRect" ( _
    BYVAL pthis AS DWORD PTR, BYVAL FaceType AS DWORD, BYVAL Level AS DWORD, _
    BYREF pLockedRect AS D3DLOCKED_RECT, BYREF pRect AS RECT, BYVAL Flags AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[19] USING IDirect3DCubeTexture9_LockRect(pthis, FaceType, Level, pLockedRect, pRect, Flags) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' UnlockRect method
' Unlocks a rectangle on a cube texture resource.
' HRESULT UnlockRect(
'   D3DCUBEMAP_FACES FaceType,
'   UINT Level
' );
' ****************************************************************************************
FUNCTION IDirect3DCubeTexture9_UnlockRect ALIAS "IDirect3DCubeTexture9_UnlockRect" ( _
    BYVAL pthis AS DWORD PTR, BYVAL FaceType AS DWORD, BYVAL Level AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[20] USING IDirect3DCubeTexture9_UnlockRect(pthis, FaceType, Level) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' AddDirtyRect method
' Adds a dirty region to a cube texture resource.
' HRESULT AddDirtyRect(
'   D3DCUBEMAP_FACES FaceType,
'   CONST RECT * pDirtyRect
' );
' ****************************************************************************************
FUNCTION IDirect3DCubeTexture9_AddDirtyRect ALIAS "IDirect3DCubeTexture9_AddDirtyRect" ( _
    BYVAL pthis AS DWORD PTR, BYVAL FaceType AS DWORD, BYREF pDirtyRect AS RECT) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[21] USING IDirect3DCubeTexture9_AddDirtyRect(pthis, FaceType, pDirtyRect) TO HRESULT
    FUNCTION = HRESULT

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

 

Page last updated on Tuesday, 14 March 2006 20:04:17 +0100