Microsoft DirectX 9.0

ID3DXPatchMesh::Optimize Method

Optimizes the patch mesh for efficient tessellation.


HRESULT Optimize(      

    DWORD Flags );


[in] Currently unused.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values.

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_CANNOTATTRSORTAttribute sort (D3DXMESHOPT_ATTRSORT) is not supported as an optimization technique.
E_OUTOFMEMORYMicrosoft?Direct3D?could not allocate sufficient memory to complete the call.


This function performs 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. If vertices are changed, this method must be called again.

© 2002 Microsoft Corporation. All rights reserved.