namespace DaggerFramework { public class Texture2d : Resource { /// /// Internal handle for the texture. If it got successfully loaded into the GPU, the value will be other than -1. /// internal int Handle { get; set; } = -1; public int Width { get; set; } public int Height { get; set; } public int Mipmaps { get; set; } = 1; public TextureFormat Format { get; set; } = TextureFormat.UncompressedR8G8B8A8; public Texture2d(string path, byte[] buffer) : base(path, buffer) { } public static Texture2d Empty => new Texture2d(string.Empty, new byte[] { }); } public enum TextureFormat { UncompressedGrayscale = 1, UncompressedGrayAlpha, UncompressedR5G6B5, UncompressedR8G8B8, UncompressedR5G5B5A1, UncompressedR4G4B4A4, UncompressedR8G8B8A8, UncompressedR32, UncompressedR32G32B32, UncompressedR32G32B32A32, CompressedDXT1Rgb, CompressedDXT1Rgba, CompressedDXT3Rgba, CompressedDXT5Rgba, CompressedETC1Rgb, CompressedETC2Rgb, CompressedETC2EACRgba, CompressedPVRTRgb, CompressedPVRTRgba, CompressedASTC4x4Rgba, CompressedASTC8x8Rgba } }