Click or drag to resize
Ab4d.SharpEngine logo

StandardMaterialBaseLoadDiffuseTexture Method

Overload List
 NameDescription
Public methodLoadDiffuseTexture(String, IBitmapIO, CommonSamplerTypes, Single, Boolean, Boolean) LoadDiffuseTexture lazily loads the specified textureFileName, creates a GpuImage object from the file and sets it to the DiffuseTexture property. The method also sets DiffuseTextureSamplerType and DiffuseTextureSampler properties. If this material was not yet initialized when this method is called ([!:Material.Scene] is not yet set), then the creation of the texture is postponed until the InitializeSceneResources method is called. To immediately create the texture, call this method and pass a VulkanDevice as the first parameter. When the created GpuImage is not cached by the Scene (useSceneCache is false by default) or GpuDevice (useGpuDeviceCache is true by default), then it is disposed when this Material is disposed.
Public methodLoadDiffuseTexture(VulkanDevice, String, IBitmapIO, CommonSamplerTypes, Single, Boolean) LoadDiffuseTexture immediately loads the specified textureFileName, creates a GpuImage object from the file and sets it to the DiffuseTexture property. The method also sets DiffuseTexture, DiffuseTextureSamplerType and DiffuseTextureSampler properties. Calling this method requires a valid gpuDevice objects. When useGpuDeviceCache is true (by default), then before loading the image the GpuDevice's cache is checked if this file was already loaded. Also, the create GpuImage is cached by the GpuDevice's cache. If you want to use Scene case, use the method override that takes Scene objects as parameter. If you want to lazily create a diffuse texture before the device is known, call the method without the gpuDevice parameter. When the created GpuImage is not cached by the GpuDevice (useGpuDeviceCache is true by default), then it is disposed when this Material is disposed.
Public methodLoadDiffuseTexture(Scene, String, IBitmapIO, CommonSamplerTypes, Single, Boolean, Boolean) LoadDiffuseTexture immediately loads the specified textureFileName, creates a GpuImage object from the file and sets it to the DiffuseTexture property. The method also sets DiffuseTexture, DiffuseTextureSamplerType and DiffuseTextureSampler properties. Calling this method requires a valid Scene object that has initialized GpuDevice set. When useGpuDeviceCache is true (by default), then before loading the image the Scene's cache is checked if this file was already loaded. Also, the create GpuImage is cached by the Scene's cache. If you want to use GpuDevice case, use the method override that takes GpuDevice objects as parameter. If you want to lazily create a diffuse texture before the device is known, call the method without the Scene parameter. When the created GpuImage is not cached by the Scene (useSceneCache is false by default) or GpuDevice (useGpuDeviceCache is true by default), then it is disposed when this Material is disposed.
Public methodLoadDiffuseTexture(Stream, String, IBitmapIO, CommonSamplerTypes, Single, Boolean, Boolean) LoadDiffuseTexture lazily loads the texture from the specified file steam, creates a GpuImage object from the file and sets it to the DiffuseTexture property. The method also sets DiffuseTextureSamplerType and DiffuseTextureSampler properties. If this material was not yet initialized when this method is called ([!:Material.Scene] is not yet set), then the creation of the texture is postponed until the InitializeSceneResources method is called. To immediately create the texture, call this method and pass a VulkanDevice as the first parameter. When the created GpuImage is not cached by the Scene (useSceneCache is false by default) or GpuDevice (useGpuDeviceCache is true by default), then it is disposed when this Material is disposed.
Public methodLoadDiffuseTexture(VulkanDevice, Stream, String, IBitmapIO, CommonSamplerTypes, Single, Boolean) LoadDiffuseTexture immediately loads the texture from the specified file steam, creates a GpuImage object from the file and sets it to the DiffuseTexture property. The method also sets DiffuseTexture, DiffuseTextureSamplerType and DiffuseTextureSampler properties. Calling this method requires a valid gpuDevice objects. When useGpuDeviceCache is true (by default), then before loading the image the GpuDevice's cache is checked if this file was already loaded. Also, the create GpuImage is cached by the GpuDevice's cache. If you want to use Scene case, use the method override that takes Scene objects as parameter. If you want to lazily create a diffuse texture before the device is known, call the method without the gpuDevice parameter. When the created GpuImage is not cached by the GpuDevice (useGpuDeviceCache is true by default), then it is disposed when this Material is disposed.
Public methodLoadDiffuseTexture(Scene, Stream, String, IBitmapIO, CommonSamplerTypes, Single, Boolean, Boolean) LoadDiffuseTexture immediately loads the texture from the specified file steam, creates a GpuImage object from the file and sets it to the DiffuseTexture property. The method also sets DiffuseTexture, DiffuseTextureSamplerType and DiffuseTextureSampler properties. Calling this method requires a valid Scene object that has initialized GpuDevice set. When useGpuDeviceCache is true (by default), then before loading the image the Scene's cache is checked if this file was already loaded. Also, the create GpuImage is cached by the Scene's cache. If you want to use GpuDevice case, use the method override that takes GpuDevice objects as parameter. If you want to lazily create a diffuse texture before the device is known, call the method without the Scene parameter. When the created GpuImage is not cached by the Scene (useSceneCache is false by default) or GpuDevice (useGpuDeviceCache is true by default), then it is disposed when this Material is disposed.
Top
See Also