PatchMesh.FromX Method

Language:

Loads a patch mesh from an XFileData object.

Overload List

public static PatchMesh FromX(XFileData, MeshFlags, Device);
public static PatchMesh FromX(XFileData, MeshFlags, Device, out EffectInstance);
public static PatchMesh FromX(XFileData, MeshFlags, Device, out ExtendedMaterial);
public static PatchMesh FromX(XFileData, MeshFlags, Device, out ExtendedMaterial, out EffectInstance);

Remarks

For mesh files that do not contain effect instance information, default effect instances are generated from the material information in the DirectX (.x) file. The default values of a default effect instance correspond to the members of the Material structure.

The default texture name also is filled in, but is handled differently. The name is Texture0@Name, which corresponds to an effect variable by the name of "Texture0" with an annotation called "Name." This contains the string file name for the texture.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
InvalidDataException The data is invalid.
OutOfMemoryException Leave Site Microsoft Direct3D could not allocate sufficient memory to complete the call.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center