Click or drag to resize
Ab4d.SharpEngine logo

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) method. To immediately load the texture use the [!:StandardMaterialBase.LoadDiffuseTexture(Scene, string, Ab4d.SharpEngine.Common.IBitmapIO?, Ab4d.SharpEngine.Common.CommonSamplerTypes, float, bool)] or LoadDiffuseTexture(VulkanDevice, String, IBitmapIO, CommonSamplerTypes, Single, Boolean) methods.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Materials
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class SolidColorMaterial : StandardMaterialBase

The SolidColorMaterial type exposes the following members.

Constructors
 NameDescription
Public methodSolidColorMaterial(String) SolidColorMaterial constructor.
Public methodSolidColorMaterial(Color3, String) SolidColorMaterial constructor with a diffuse color (Opacity is 1)
Public methodSolidColorMaterial(Color4, String) SolidColorMaterial constructor with diffuse color and opacity specified in Color4 struct (opacity is set from color's alpha value).
Public methodSolidColorMaterial(Color3, Single, String) SolidColorMaterial constructor with a diffuse color and an opacity value
Public methodSolidColorMaterial(GpuImage, CommonSamplerTypes, String) StandardMaterial constructor with diffuse texture. The textureImage is not disposed when disposing this material.
Public methodSolidColorMaterial(String, IBitmapIO, CommonSamplerTypes, Single, 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.
Public methodSolidColorMaterial(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.
Top
Methods
 NameDescription
Protected methodCreateClone
(Overrides MaterialCreateClone)
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides StandardMaterialBaseOnInitializeSceneResources(Scene, VulkanDevice))
Top
See Also