public static TextureAtlas Create(params FreeType.Glyph[] glyphs) { var builder = new TextureAtlasBuilder(); foreach (var glyph in glyphs) { builder.AddImage(new ImageHandle(glyph)); } return(builder.Create()); }
public static TextureAtlas Create(Dictionary <uint, Bitmap> images) { var builder = new TextureAtlasBuilder(); foreach (var image in images) { builder.AddImage(new ImageHandle(image.Key, image.Value)); } return(builder.Create()); }
private void LoadTextures() { Console.WriteLine("[Client] Loading textures..."); using (var builder = new TextureAtlasBuilder <GLTexture>(textureFactory)) { var files = Directory.GetFiles("./Textures/Blocks"); foreach (var file in files) { var name = Path.GetFileNameWithoutExtension(file); builder.AddImage(name, new Bitmap(file)); } blockTextureAtlas = builder.Build(); } Console.WriteLine("[Client] Loaded textures"); }