Click or drag to resize
AB4D logo

TextureCacheGetTextureFromFile Method

Checks if a texture with specified fileName was already loaded and cached. In this case the method returns a cached texture and increases its reference count. Otherwise null is returned. You need to dispose the texture when it is not used any more.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public SharedDXResourceWrapper<ShaderResourceView> GetTextureFromFile(
	string fileName,
	out bool hasTransparency
)

Parameters

fileName  String
file name
hasTransparency  Boolean
returns true if texture has transparent colors

Return Value

SharedDXResourceWrapperShaderResourceView
ShaderResourceView wrapped by SharedDXResourceWrapper or null if texture with the specified fileName was not yet cached
See Also