Click or drag to resize
AB4D logo

TextureCache Class

TextureCache class provides texture cashing for DXEngine.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXDisposableDXResource
      Ab3d.DirectXDXDeviceResource
        Ab3d.DirectXTextureCache

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class TextureCache : DXDeviceResource

The TextureCache type exposes the following members.

Constructors
 NameDescription
Public methodTextureCache Constructor
Top
Properties
 NameDescription
Public propertyGenerateMipMaps Gets or sets a Boolean that specifies if mip-maps are generated when texture is created by this TextureCache
Top
Methods
 NameDescription
Public methodCacheTexture(ShaderResourceView, Boolean, Object) CacheTexture stores the texture (as ShaderResourceView) as cached texture created from the originalObject.
Public methodCacheTexture(ShaderResourceView, Boolean, String) CacheTexture stores the texture (as ShaderResourceView) as cached texture created from the originalObject.
Public methodCleanupCache Cleans all disposed objects from cache
Public methodGetTextureFromFile 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.
Public methodGetTextureFromObject Check cache and tries to find a texture that was created from the originalObject. If texture is not found, null is returned. The texture needs to be disposed when it is not used any more.
Top
See Also