Vertex |
public class VertexColorMaterial : Material, ISpecularMaterial, ITransparentMaterial, IVertexColorMaterial, ITwoSidedMaterial
The VertexColorMaterial type exposes the following members.
Name | Description | |
---|---|---|
VertexColorMaterial | Constructor | |
VertexColorMaterial(Color4) | Constructor |
Name | Description | |
---|---|---|
CreateDynamicBuffer | Gets or sets a Boolean that specifies if a dynamic vertex buffer will be created from the PositionColors array. This can be used in case when the colors change very often. | |
HasSpecularColor | Gets a boolean that specifies if this material is using specular effect. | |
HasTransparency | Gets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene. | |
IsTwoSided | Gets or sets a Boolean that specifies if the material should be rendered on both front and back side. Default value is false. | |
PositionColors | Gets or sets the Color4 array that specifies the colors for each position of the object. | |
SpecularColor | Gets the Color3 that specifies the color used to draw the specular highlight effect. | |
SpecularPower | Gets a float that specifies the power of the specular effect. Zero values means that the specular effect is turned off. | |
VertexColorsVertexBufferBinding | Gets a VertexBufferBinding for an array of Color4 values where each value represents a color of one position. |
Name | Description | |
---|---|---|
ToString |
ToString
(Overrides MaterialToString) | |
Update | Update method updates the DirectX vertex buffer from the current values of PositionColors. |
VertexColorMaterial can be used to render 3D objects with specifying color for each of its position.
The colors of each position is specified in the PositionColors array.
When values in the PositionColors array are changed, you need to call Update method to update the DirectX resources.