Click or drag to resize
Ab4d.SharpEngine logo

StandardMaterial(String, IBitmapIO, CommonSamplerTypes, Single, String) Constructor

StandardMaterial constructor with file name of the diffuse texture. The texture will be lazily loaded when this material will be initialized. When the created GpuImage is not cached by the Scene (defined by static UseSceneCacheForTextures) or GpuDevice (defined by static UseGpuDeviceCacheForTextures), then it is disposed when this Material is disposed.

Namespace: Ab4d.SharpEngine.Materials
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public StandardMaterial(
	string textureFileName,
	IBitmapIO? bitmapIO = null,
	CommonSamplerTypes samplerType = CommonSamplerTypes.Mirror,
	float alphaClipThreshold = 0f,
	string? name = null
)

Parameters

textureFileName  String
texture file name
bitmapIO  IBitmapIO  (Optional)
Optional IBitmapIO that is used to load the texture. When null, then the DefaultBitmapIOis used
samplerType  CommonSamplerTypes  (Optional)
texture sampler type (Mirror by default)
alphaClipThreshold  Single  (Optional)
optional float that defines the AlphaClipThreshold (0 by default)
name  String  (Optional)
optional material name
See Also