IDirect3DTexture9 Interface

 

 

' ****************************************************************************************
' IDirect3DTexture9 interface
' $IID_IDirect3DTexture9 = GUID$("{85C31227-3DE5-4f00-9B3A-F11AC38C18B5}")
' ****************************************************************************************

' ****************************************************************************************
' Applications use the methods of the IDirect3DTexture9 interface to manipulate a texture resource.
' The IDirect3DTexture9 interface can be obtained by calling the IDirect3DDevice9::CreateTexture
' method or one of the D3DXCreateTexturexxx 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_(IDirect3DTexture9, 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;

'    /*** IDirect3DTexture9 methods ***/
' 17.  STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC *pDesc) PURE;
' 18.  STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level,IDirect3DTexture9** ppSurfaceLevel) PURE;
' 19.  STDMETHOD(LockRect)(THIS_ UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE;
' 20.  STDMETHOD(UnlockRect)(THIS_ UINT Level) PURE;
' 21.  STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pDirtyRect) PURE;
'};
' ****************************************************************************************

' ****************************************************************************************
' GetLevelDesc method
' Retrieves a level description of a texture resource.
' HRESULT GetLevelDesc(
'   UINT Level,
'   D3DSURFACE_DESC * pDesc
' );
' ****************************************************************************************
FUNCTION IDirect3DTexture9_GetLevelDesc ALIAS "IDirect3DTexture9_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 IDirect3DTexture9_GetLevelDesc(pthis, Level, pDesc) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' GetSurfaceLevel method
' Retrieves the specified texture surface level.
' HRESULT GetSurfaceLevel(
'   UINT Level,
'   IDirect3DSurface9 ** ppSurfaceLevel
' );
' ****************************************************************************************
FUNCTION IDirect3DTexture9_GetSurfaceLevel ALIAS "IDirect3DTexture9_GetSurfaceLevel" ( _
    BYVAL pthis AS DWORD PTR, BYVAL Level AS DWORD, BYREF ppSurfaceLevel AS DWORD) EXPORT AS LONG

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

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

' ****************************************************************************************
' LockRect method
' Locks a rectangle on a texture resource.
' HRESULT LockRect(
'   UINT Level,
'   D3DLOCKED_RECT * pLockedRect,
'   CONST RECT * pRect,
'   DWORD Flags
' );
' ****************************************************************************************
FUNCTION IDirect3DTexture9_LockRect ALIAS "IDirect3DTexture9_LockRect" ( _
    BYVAL pthis AS DWORD PTR, 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 IDirect3DTexture9_LockRect(pthis, Level, pLockedRect, pRect, Flags) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' UnlockRect method
' Unlocks a rectangle on a texture resource.
' HRESULT UnlockRect(
'   UINT Level
' );
' ****************************************************************************************
FUNCTION IDirect3DTexture9_UnlockRect ALIAS "IDirect3DTexture9_UnlockRect" ( _
    BYVAL pthis AS DWORD PTR, 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 IDirect3DTexture9_UnlockRect(pthis, Level) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' AddDirtyRect method
' Adds a dirty region to a texture resource.
' HRESULT AddDirtyRect(
'   CONST RECT * pDirtyRect
' );
' ****************************************************************************************
FUNCTION IDirect3DTexture9_AddDirtyRect ALIAS "IDirect3DTexture9_AddDirtyRect" ( _
    BYVAL pthis AS DWORD PTR, 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 IDirect3DTexture9_AddDirtyRect(pthis, pDirtyRect) TO HRESULT
    FUNCTION = HRESULT

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

 

Page last updated on Tuesday, 14 March 2006 20:27:07 +0100