Class TextureAtlas
- Namespace
- Fantas
- Assembly
- Fantas.dll
A set of Textures grouped You can use Texture atlas when you have a set of textures that need to be loaded together. On old devices this can help to save VRAM, since all only one texture is loaded into the GPU and the small textures are bits of the main texture atlas.
public sealed class TextureAtlas : IDisposable
- Inheritance
-
TextureAtlas
- Implements
- Inherited Members
Properties
TextureNames
Return all the names inside the TextureAtlas
public string[] TextureNames { get; }
Property Value
- string[]
Methods
Dispose()
Dispose Texture Atlas from VRAM
public void Dispose()
~TextureAtlas()
Finalizer
protected ~TextureAtlas()
FromName(string)
Loads a texture from Atlas by Name If the texture isn't found in the Atlas, the load wil fallback to loading the texture as asset/file
public Texture FromName(string textureName)
Parameters
textureName
string
Returns
Load(string)
Load atlas by Name
public static TextureAtlas Load(string atlasName)
Parameters
atlasName
stringasset lookup name
Returns
LoadBinaryFromResource(Assembly, string, float)
Load binary Atlas (with Crunch format) from resource
public static TextureAtlas LoadBinaryFromResource(Assembly assembly, string name, float scale)
Parameters
assembly
AssemblyAssembly with .bin and the image resource
name
stringasset lookup name
scale
floattexture scale