Mesh.FromStream Method ()

Loads a mesh from a StreamLeave Site.

Overload List

public static Mesh FromStream(Stream, int, MeshFlags, Device);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out EffectInstance);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out ExtendedMaterial);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out ExtendedMaterial, out EffectInstance);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out GraphicsStream);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out GraphicsStream, out EffectInstance);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out GraphicsStream, out ExtendedMaterial);
public static Mesh FromStream(Stream, int, MeshFlags, Device, out GraphicsStream, out ExtendedMaterial, out EffectInstance);
public static Mesh FromStream(Stream, MeshFlags, Device);
public static Mesh FromStream(Stream, MeshFlags, Device, out EffectInstance);
public static Mesh FromStream(Stream, MeshFlags, Device, out ExtendedMaterial);
public static Mesh FromStream(Stream, MeshFlags, Device, out ExtendedMaterial, out EffectInstance);
public static Mesh FromStream(Stream, MeshFlags, Device, out GraphicsStream);
public static Mesh FromStream(Stream, MeshFlags, Device, out GraphicsStream, out EffectInstance);
public static Mesh FromStream(Stream, MeshFlags, Device, out GraphicsStream, out ExtendedMaterial);

Remarks

All meshes in the file are collapsed into one output mesh. If the file contains a frame hierarchy, all of the transformations are applied to the mesh.

For mesh files that do not contain effect instance information, default effect instances are generated from the material information in the DirectX (.x) file. A default effect instance has default values that 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 variable 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.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.