 |
SolidColorMaterial(Stream, String, IBitmapIO, CommonSamplerTypes, Single, String) Constructor |
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).
Namespace: Ab4d.SharpEngine.MaterialsAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntaxpublic SolidColorMaterial(
Stream fileStream,
string? streamFileName,
IBitmapIO? bitmapIO = null,
CommonSamplerTypes samplerType = CommonSamplerTypes.Mirror,
float alphaClipThreshold = 0f,
string? name = null
)
Parameters
- fileStream Stream
- file stream
- streamFileName String
- optional file name (needs to be set when useSceneCache is true)
- 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