Click or drag to resize
Ab4d.SharpEngine logo

TextureLoaderCreateTextureAsync(Stream, String, VulkanDevice, IBitmapIO, Boolean, Boolean) Method

CreateTextureAsync loads the specified texture file stream in the background and returns the created GpuImage. See remarks for TextureLoader for more info.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
public static Task<GpuImage> CreateTextureAsync(
	Stream fileStream,
	string? streamFileName,
	VulkanDevice gpuDevice,
	IBitmapIO? bitmapIO = null,
	bool generateMipMaps = true,
	bool useGpuDeviceCache = false
)

Parameters

fileStream  Stream
file stream
streamFileName  String
optional file name (needs to be set when useSceneCache is true)
gpuDevice  VulkanDevice
VulkanDevice
bitmapIO  IBitmapIO  (Optional)
Optional IBitmapIO that is used to load the texture. When null, then the DefaultBitmapIOis used
generateMipMaps  Boolean  (Optional)
when true (by default) then mip maps will be created for the GpuImage. This takes longer to create the GpuImage but improves the rendering performance and quality of shown texture.
useGpuDeviceCache  Boolean  (Optional)
when true (false 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

Return Value

TaskGpuImage
created GpuImage
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.TextureLoader.CreateTextureAsync(System.IO.Stream,System.String,Ab4d.SharpEngine.Vulkan.VulkanDevice,Ab4d.SharpEngine.Common.IBitmapIO,System.Boolean,System.Boolean)"]

See Also