 |
SolidColorMaterial Class |
SolidColorMaterial is a material that is not shaded by lighting and is always rendered exactly as specified by the diffuse material properties.
This means that positions and colors of the lights do not change the appearance.
It is possible to create a texture by using
CreateDiffuseTexture(RawImageData, CommonSamplerTypes, String, Single) method.
To lazily load a texture use constructor that takes file name and IBitmapIO or call
LoadDiffuseTexture(String, IBitmapIO, CommonSamplerTypes, Single, Boolean, Boolean, Boolean) method.
To immediately load the texture use the
LoadDiffuseTexture(Scene, String, IBitmapIO, CommonSamplerTypes, Single, Boolean, Boolean) or
LoadDiffuseTexture(VulkanDevice, String, IBitmapIO, CommonSamplerTypes, Single, Boolean) methods.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.MaterialsAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic class SolidColorMaterial : StandardMaterialBase,
ISolidColorMaterial
The SolidColorMaterial type exposes the following members.
Constructors| | Name | Description |
|---|
 | SolidColorMaterial(String) |
SolidColorMaterial constructor.
|
 | SolidColorMaterial(Color3, String) |
SolidColorMaterial constructor with a diffuse color (Opacity is 1)
|
 | SolidColorMaterial(Color4, String) |
SolidColorMaterial constructor with diffuse color and opacity specified in Color4 struct (opacity is set from color's alpha value). The color is not alpha pre-multiplied.
|
 | SolidColorMaterial(Color3, Single, String) |
SolidColorMaterial constructor with a diffuse color and an opacity value
|
 | SolidColorMaterial(GpuImage, CommonSamplerTypes, String) |
StandardMaterial constructor with diffuse texture.
The textureImage is not disposed when disposing this material.
|
 | SolidColorMaterial(Stream, String, IBitmapIO, CommonSamplerTypes, Single, String) |
StandardMaterial constructor with file stream of the diffuse texture.
The texture will be lazily loaded when this material will be initialized.
The loaded texture is disposed when disposing this material.
This constructor does not have loadInBackground and initialDiffuseColor (as the one that takes textureFileName) because this would require that the fileStream is not closed until the texture is loaded (but there is no callback to the user to do that).
|
 | SolidColorMaterial(String, IBitmapIO, CommonSamplerTypes, Single, NullableColor4, Boolean, String) |
StandardMaterial constructor with file name of the diffuse texture.
The texture will be lazily loaded when this material will be initialized.
The loaded texture is disposed when disposing this material.
|
Top
Properties| | Name | Description |
|---|
 | IsSolidColor |
Always returns true because this material is always rendered as a solid color without any shading from lights.
|
Top
Methods
See Also