public static Texture FromUrl(string url) { Texture tex = new Texture(); tex.Load(url); return(tex); }
public Texture GetCachedTexture2d(string filename) { if (textureList2d == null) { textureList2d = new Dictionary <string, Texture>(); } if (textureList2d.ContainsKey(filename)) { return(textureList2d[filename]); } Texture texture = new Texture(); texture.Load(GetFileStream(filename)); textureList2d[filename] = texture; return(texture); }
public static Texture LoadPlanetTexture(string url) { Texture texture = new Texture(); texture.Load(url); return texture; }