Click or drag to resize
Ab4d.SharpEngine logo

PhysicallyBasedMaterialSetTextureMap(TextureMapTypes, String, IBitmapIO, CommonSamplerTypes, Boolean, Boolean, Boolean) Method

SetTextureMap updates (when the same mapType was already added) or adds a map type to this PhysicallyBasedMaterial. The texture is created from the provided the file name. If this material is not yet initialized, then the texture is loaded when initialized.

Namespace: Ab4d.SharpEngine.Materials
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public void SetTextureMap(
	TextureMapTypes mapType,
	string textureFileName,
	IBitmapIO? bitmapIO = null,
	CommonSamplerTypes samplerType = CommonSamplerTypes.Mirror,
	bool useSceneCache = false,
	bool useGpuDeviceCache = true,
	bool loadInBackground = false
)

Parameters

mapType  TextureMapTypes
type of texture map - one of TextureMapTypes
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)
useSceneCache  Boolean  (Optional)
when true (false by default) than before loading the image the Scene's cache is checked if this file was already loaded. Also, the created GpuImage is cached by the Scene's cache.
useGpuDeviceCache  Boolean  (Optional)
when true (true by default) than before loading the image the GpuDevice's cache is checked if this file was already loaded. Also, the created GpuImage is cached by the GpuDevice's cache
loadInBackground  Boolean  (Optional)
when true (false by default) then the texture file is loaded in the background thread
See Also