MeshBuilder.SetMaterial Method
Note
This method is available only when developing for Windows.
Specifies the material used by the current mesh.
Syntax
'Declaration
Public Sub SetMaterial ( _
material As MaterialContent _
)
public void SetMaterial (
MaterialContent material
)
public:
void SetMaterial(
MaterialContent material
)
Parameters
- material
Type: MaterialContent
The material to be used by the mesh.
Remarks
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.
Requirements
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
See Also
Reference
MeshBuilder Class
MeshBuilder Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace
Platforms
Windows 7, Windows Vista, Windows XP