public static void ImageDecompress(AssetBase assetBase) { if (assetBase == null) return; AssetType type = (AssetType)assetBase.Type; AssetTexture texture = null; switch(type) { case AssetType.ImageJPEG: case AssetType.ImageTGA: case AssetType.Texture: // Jpeg2000 case AssetType.TextureTGA: texture = new AssetTexture(new UUID(assetBase.ID), assetBase.Data); break; } if (texture == null) return; if (type == AssetType.Texture) { try { if (texture.Decode()) assetBase.Data = texture.Image.ExportTGA(); } catch { } } }
public void AddMaterial(AssetBase material) { materials.Add(material); }
public AssetIrrMemory(AssetBase assetBase) { irrFile = assetBase; }