|
|
|
ID3DXPatchMesh Interface |
|
' ****************************************************************************************
' ID3DXPatchMesh interface
' $IID_ID3DXPatchMesh = GUID$("{3CE6CC22-DBF2-44f4-894D-F9C34A337139}")
' ****************************************************************************************
' ****************************************************************************************
' This interface encapsulates patch mesh functionality.
' Remarks
' A patch mesh is a mesh that consists of a series of patches.
' To obtain the ID3DXPatchMesh interface, call the D3DXCreatePatchMesh function.
' Interface Information
' Stock Implementation d3d9.dll
' Custom Implementation No
' Inherits from IUnknown
' Header d3dx9mesh.h
' Import library d3dx9.lib
' Minimum operating systems Windows 98
' ****************************************************************************************
' ****************************************************************************************
'DECLARE_INTERFACE_(ID3DXPatchMesh, IUnknown)
'{
' // IUnknown
' 0. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
' 1. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
' 2. STDMETHOD_(ULONG, Release)(THIS) PURE;
' // ID3DXPatchMesh
' // Return creation parameters
' 3. STDMETHOD_(DWORD, GetNumPatches)(THIS) PURE;
' 4. STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
' 5. STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE;
' 6. STDMETHOD_(DWORD, GetControlVerticesPerPatch)(THIS) PURE;
' 7. STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
' 8. STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *ppDevice) PURE;
' 9. STDMETHOD(GetPatchInfo)(THIS_ LPD3DXPATCHINFO PatchInfo) PURE;
' // Control mesh access
' 10. STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* ppVB) PURE;
' 11. STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* ppIB) PURE;
' 12. STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID *ppData) PURE;
' 13. STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
' 14. STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID *ppData) PURE;
' 15. STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
' 16. STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** ppData) PURE;
' 17. STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
' // This function returns the size of the tessellated mesh given a tessellation level.
' // This assumes uniform tessellation. For adaptive tessellation the Adaptive parameter must
' // be set to TRUE and TessellationLevel should be the max tessellation.
' // This will result in the max mesh size necessary for adaptive tessellation.
' 18. STDMETHOD(GetTessSize)(THIS_ FLOAT fTessLevel,DWORD Adaptive, DWORD *NumTriangles,DWORD *NumVertices) PURE;
' //GenerateAdjacency determines which patches are adjacent with provided tolerance
' //this information is used internally to optimize tessellation
' 19. STDMETHOD(GenerateAdjacency)(THIS_ FLOAT Tolerance) PURE;
' //CloneMesh Creates a new patchmesh with the specified decl, and converts the vertex buffer
' //to the new decl. Entries in the new decl which are new are set to 0. If the current mesh
' //has adjacency, the new mesh will also have adjacency
' 20. STDMETHOD(CloneMesh)(THIS_ DWORD Options, CONST D3DVERTEXELEMENT9 *pDecl, LPD3DXPATCHMESH *pMesh) PURE;
' // Optimizes the patchmesh for efficient tessellation. This function is designed
' // to perform one time optimization for patch meshes that need to be tessellated
' // repeatedly by calling the Tessellate() method. The optimization performed is
' // independent of the actual tessellation level used.
' // Currently Flags is unused.
' // If vertices are changed, Optimize must be called again
' 21. STDMETHOD(Optimize)(THIS_ DWORD flags) PURE;
' //gets and sets displacement parameters
' //displacement maps can only be 2D textures MIP-MAPPING is ignored for non adapative tessellation
' 22. STDMETHOD(SetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9 Texture,
' D3DTEXTUREFILTERTYPE MinFilter,
' D3DTEXTUREFILTERTYPE MagFilter,
' D3DTEXTUREFILTERTYPE MipFilter,
' D3DTEXTUREADDRESS Wrap,
' DWORD dwLODBias) PURE;
' 23. STDMETHOD(GetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9 *Texture,
' D3DTEXTUREFILTERTYPE *MinFilter,
' D3DTEXTUREFILTERTYPE *MagFilter,
' D3DTEXTUREFILTERTYPE *MipFilter,
' D3DTEXTUREADDRESS *Wrap,
' DWORD *dwLODBias) PURE;
' // Performs the uniform tessellation based on the tessellation level.
' // This function will perform more efficiently if the patch mesh has been optimized using the Optimize() call.
' 24. STDMETHOD(Tessellate)(THIS_ FLOAT fTessLevel,LPD3DXMESH pMesh) PURE;
' // Performs adaptive tessellation based on the Z based adaptive tessellation criterion.
' // pTrans specifies a 4D vector that is dotted with the vertices to get the per vertex
' // adaptive tessellation amount. Each edge is tessellated to the average of the criterion
' // at the 2 vertices it connects.
' // MaxTessLevel specifies the upper limit for adaptive tesselation.
' // This function will perform more efficiently if the patch mesh has been optimized using the Optimize() call.
' 25. STDMETHOD(TessellateAdaptive)(THIS_
' CONST D3DXVECTOR4 *pTrans,
' DWORD dwMaxTessLevel,
' DWORD dwMinTessLevel,
' LPD3DXMESH pMesh) PURE;
'};
' ****************************************************************************************
' ****************************************************************************************
' GetNumPatches method
' Gets the number of patches in the mesh.
' DWORD GetNumPatches();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetNumPatches ALIAS "ID3DXPatchMesh_GetNumPatches" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[3] USING ID3DXPatchMesh_GetNumPatches(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumVertices method
' Gets the number of vertices in the mesh.
' DWORD GetNumVertices();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetNumVertices ALIAS "ID3DXPatchMesh_GetNumVertices" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[4] USING ID3DXPatchMesh_GetNumVertices(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetDeclaration method
' Gets the vertex declaration.
' HRESULT GetDeclaration(
' LPD3DVERTEXELEMENT9 pDeclaration[MAX_FVF_DECL_SIZE]
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetDeclaration ALIAS "ID3DXPatchMesh_GetDeclaration" ( _
BYVAL pthis AS DWORD PTR, BYREF pDeclaration AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[5] USING ID3DXPatchMesh_GetDeclaration(pthis, pDeclaration) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetControlVerticesPerPatch method
' Gets the number of control vertices per patch.
' DWORD GetControlVerticesPerPatch();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetControlVerticesPerPatch ALIAS "ID3DXPatchMesh_GetControlVerticesPerPatch" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[6] USING ID3DXPatchMesh_GetControlVerticesPerPatch(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetOptions method
' Gets the type of patch.
' DWORD GetOptions();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetOptions ALIAS "ID3DXPatchMesh_GetOptions" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[7] USING ID3DXPatchMesh_GetOptions(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetDevice method
' Retrieves the device associated with the mesh.
' Remarks
' Calling this method will increase the internal reference count on the IDirect3DDevice9
' interface. Be sure to call IUnknown::Release when you are done using this IDirect3DDevice9
' interface or you will have a memory leak.
' HRESULT GetDevice(
' LPDIRECT3DDEVICE9* ppDevice
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetDevice ALIAS "ID3DXPatchMesh_GetDevice" ( _
BYVAL pthis AS DWORD PTR, BYREF ppDevice AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[8] USING ID3DXPatchMesh_GetDevice(pthis, ppDevice) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetPatchInfo method
' Gets the attributes of the patch.
' HRESULT GetPatchInfo(
' LPD3DXPATCHINFO PatchInfo
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetPatchInfo ALIAS "ID3DXPatchMesh_GetPatchInfo" ( _
BYVAL pthis AS DWORD PTR, BYREF PatchInfo AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[9] USING ID3DXPatchMesh_GetPatchInfo(pthis, PatchInfo) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetVertexBuffer method
' Gets the mesh vertex buffer.
' HRESULT GetVertexBuffer(
' LPDIRECT3DVERTEXBUFFER9 * ppVB
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetVertexBuffer ALIAS "ID3DXPatchMesh_GetVertexBuffer" ( _
BYVAL pthis AS DWORD PTR, BYREF ppVB AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[10] USING ID3DXPatchMesh_GetVertexBuffer(pthis, ppVB) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetIndexBuffer method
' Gets the mesh index buffer.
' HRESULT GetIndexBuffer(
' LPDIRECT3DINDEXBUFFER9 * ppIB
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetIndexBuffer ALIAS "ID3DXPatchMesh_GetIndexBuffer" ( _
BYVAL pthis AS DWORD PTR, BYREF ppIB AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[11] USING ID3DXPatchMesh_GetIndexBuffer(pthis, ppIB) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' LockVertexBuffer method
' Lock the vertex buffer.
' HRESULT LockVertexBuffer(
' DWORD flags,
' LPVOID * ppData
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_LockVertexBuffer ALIAS "ID3DXPatchMesh_LockVertexBuffer" ( _
BYVAL pthis AS DWORD PTR, BYVAL flags AS DWORD, BYREF ppData AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[12] USING ID3DXPatchMesh_LockVertexBuffer(pthis, flags, ppData) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnlockVertexBuffer method
' Unlock the vertex buffer.
' HRESULT UnlockVertexBuffer();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_UnlockVertexBuffer ALIAS "ID3DXPatchMesh_UnlockVertexBuffer" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[13] USING ID3DXPatchMesh_UnlockVertexBuffer(pthis) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' LockIndexBuffer method
' Lock the index buffer.
' HRESULT LockIndexBuffer(
' DWORD flags,
' LPVOID * ppData
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_LockIndexBuffer ALIAS "ID3DXPatchMesh_LockIndexBuffer" ( _
BYVAL pthis AS DWORD PTR, BYVAL flags AS DWORD, BYREF ppData AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[14] USING ID3DXPatchMesh_LockIndexBuffer(pthis, flags, ppData) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnlockIndexBuffer method
' Unlock the index buffer.
' HRESULT UnlockIndexBuffer();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_UnlockIndexBuffer ALIAS "ID3DXPatchMesh_UnlockIndexBuffer" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[15] USING ID3DXPatchMesh_UnlockIndexBuffer(pthis) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' LockAttributeBuffer method
' Lock the attribute buffer.
' HRESULT LockAttributeBuffer(
' DWORD flags,
' DWORD ** ppData
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_LockAttributeBuffer ALIAS "ID3DXPatchMesh_LockAttributeBuffer" ( _
BYVAL pthis AS DWORD PTR, BYVAL flags AS DWORD, BYREF ppData AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[16] USING ID3DXPatchMesh_LockAttributeBuffer(pthis, flags, ppData) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnlockAttributeBuffer method
' Unlock the attribute buffer.
' HRESULT UnlockAttributeBuffer();
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_UnlockAttributeBuffer ALIAS "ID3DXPatchMesh_UnlockAttributeBuffer" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[17] USING ID3DXPatchMesh_UnlockAttributeBuffer(pthis) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetTessSize method
' Gets the size of the tessellated mesh, given a tessellation level.
' HRESULT GetTessSize(
' FLOAT fTessLevel,
' DWORD Adaptive,
' DWORD * NumTriangles,
' DWORD * NumVertices
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetTessSize ALIAS "ID3DXPatchMesh_GetTessSize" ( _
BYVAL pthis AS DWORD PTR, BYVAL fTessLevel AS SINGLE, BYVAL Adaptive AS DWORD, _
BYREF NumTriangles AS DWORD, BYREF NumVertices AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[18] USING ID3DXPatchMesh_GetTessSize(pthis, fTessLevel, Adaptive, NumTriangles, NumVertices) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GenerateAdjacency method
' Generate a list of mesh edges and the patches that share each edge.
' HRESULT GenerateAdjacency(
' FLOAT fTolerance
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GenerateAdjacency ALIAS "ID3DXPatchMesh_GenerateAdjacency" ( _
BYVAL pthis AS DWORD PTR, BYVAL Tolerance AS SINGLE) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[19] USING ID3DXPatchMesh_GenerateAdjacency(pthis, Tolerance) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' CloneMesh method
' Creates a new patch mesh with the specified vertex declaration.
' HRESULT CloneMesh(
' DWORD Options,
' CONST D3DVERTEXELEMENT9 * pDecl,
' LPD3DXPATCHMESH * pMesh
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_CloneMesh ALIAS "ID3DXPatchMesh_CloneMesh" ( _
BYVAL pthis AS DWORD PTR, BYVAL Options AS DWORD, BYVAL pDecl AS DWORD, _
BYREF pMesh AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[20] USING ID3DXPatchMesh_CloneMesh(pthis, Options, pDecl, pMesh) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Optimize method
' Optimizes the patch mesh for efficient tessellation.
' HRESULT Optimize(
' DWORD Flags
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_Optimize ALIAS "ID3DXPatchMesh_Optimize" ( _
BYVAL pthis AS DWORD PTR, BYVAL Flags AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[21] USING ID3DXPatchMesh_Optimize(pthis, Flags) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetDisplaceParam method
' Sets mesh geometry displacement parameters.
' HRESULT SetDisplaceParam(
' LPDIRECT3DBASETEXTURE9 Texture,
' D3DTEXTUREFILTERTYPE MinFilter,
' D3DTEXTUREFILTERTYPE MagFilter,
' D3DTEXTUREFILTERTYPE MipFilter,
' D3DTEXTUREADDRESS Wrap,
' DWORD dwLODBias
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_SetDisplaceParam ALIAS "ID3DXPatchMesh_SetDisplaceParam" ( _
BYVAL pthis AS DWORD PTR, BYVAL Texture AS DWORD, BYVAL MinFilter AS DWORD, _
BYVAL MagFilter AS DWORD, BYVAL MipFilter AS DWORD, BYVAL Wrap AS DWORD, _
BYVAL dwLODBias AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[22] USING ID3DXPatchMesh_SetDisplaceParam(pthis, Texture, MinFilter, MagFilter, MipFilter, Wrap, dwLODBias) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetDisplaceParam method
' Gets mesh geometry displacement parameters.
' HRESULT GetDisplaceParam(
' LPDIRECT3DBASETEXTURE9* Texture,
' D3DTEXTUREFILTERTYPE* MinFilter,
' D3DTEXTUREFILTERTYPE* MagFilter,
' D3DTEXTUREFILTERTYPE* MipFilter,
' D3DTEXTUREADDRESS* Wrap,
' DWORD* dwLODBias
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_GetDisplaceParam ALIAS "ID3DXPatchMesh_GetDisplaceParam" ( _
BYVAL pthis AS DWORD PTR, BYREF Texture AS DWORD, BYREF MinFilter AS DWORD, _
BYREF MagFilter AS DWORD, BYREF MipFilter AS DWORD, BYREF Wrap AS DWORD, _
BYREF dwLODBias AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[23] USING ID3DXPatchMesh_GetDisplaceParam(pthis, Texture, MinFilter, MagFilter, MipFilter, Wrap, dwLODBias) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Tessellate method
' Performs uniform tessellation based on the tessellation level.
' HRESULT Tessellate(
' FLOAT fTessLevel,
' LPD3DXMESH pMesh
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_Tessellate ALIAS "ID3DXPatchMesh_Tessellate" ( _
BYVAL pthis AS DWORD PTR, BYVAL fTessLevel AS SINGLE, BYVAL pMesh AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[24] USING ID3DXPatchMesh_Tessellate(pthis, fTessLevel, pMesh) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' TessellateAdaptive method
' Performs adaptive tessellation based on the z-based adaptive tessellation criterion.
' HRESULT TessellateAdaptive(
' CONST D3DXVECTOR4* pTrans,
' DWORD dwMaxTessLevel,
' DWORD dwMinTessLevel,
' LPD3DXMESH pMesh
' );
' ****************************************************************************************
FUNCTION ID3DXPatchMesh_TessellateAdaptive ALIAS "ID3DXPatchMesh_TessellateAdaptive" ( _
BYVAL pthis AS DWORD PTR, BYREF pTrans AS D3DXVECTOR4, BYVAL dwMaxTessLevel AS DWORD, _
BYVAL dwMinTessLevel AS DWORD, BYVAL pMesh AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[25] USING ID3DXPatchMesh_TessellateAdaptive(pthis, pTrans, dwMaxTessLevel, dwMinTessLevel, pMesh) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
|
Page last updated on Tuesday, 14 March 2006 23:16:32 +0100