Example #1
0
        internal Texture(AssetManager manager, string name, string file, TextureLoadSettings loadSettings, TextureImporterBase importer)
            : base(manager, AssetType.File, name, file)
        {
            if (importer == null)
            {
                throw new ArgumentNullException("importer");
            }

            this.loadSettings = loadSettings;
            this.importer     = importer;

            this.header = importer.LoadHeader(file, loadSettings);
        }
Example #2
0
 /// <summary>
 /// Lädt eine Texture.
 /// </summary>
 /// <param name="file">Der Pfad zur Texture.</param>
 /// <param name="settings">Die Einstellungen, die für das Laden der Texture benutzt werden.</param>
 /// <returns></returns>
 public Texture LoadTexture(string name, string file, TextureLoadSettings settings)
 {
     return(new Texture(this, name, file, settings, GetImporter <TextureImporterBase>(Path.GetExtension(file))));
 }