MeshBuilder.SetMaterial Method

This method is available only when developing for Windows.
Specifies the material used by the current mesh.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

public void SetMaterial (
         MaterialContent material


Type: MaterialContent
The material to be used by the mesh.

Sets the material used by the triangle being defined next. This material, in conjunction with SetOpaqueData, determines the GeometryContent object containing the next triangle. MeshBuilder maintains the material value for all future triangles. Therefore, if multiple triangles share the same material, you need only one call to SetMaterial.

Windows 7, Windows Vista, Windows XP

Community Additions