using System; using System.Runtime.InteropServices; namespace Raylib_cs { /// /// Pixel formats
/// NOTE: Support depends on OpenGL version and platform ///
public enum PixelFormat { /// /// 8 bit per pixel (no alpha) /// PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, /// /// 8*2 bpp (2 channels) /// PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, /// /// 16 bpp /// PIXELFORMAT_UNCOMPRESSED_R5G6B5, /// /// 24 bpp /// PIXELFORMAT_UNCOMPRESSED_R8G8B8, /// /// 16 bpp (1 bit alpha) /// PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, /// /// 16 bpp (4 bit alpha) /// PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, /// /// 32 bpp /// PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, /// /// 32 bpp (1 channel - float) /// PIXELFORMAT_UNCOMPRESSED_R32, /// /// 32*3 bpp (3 channels - float) /// PIXELFORMAT_UNCOMPRESSED_R32G32B32, /// /// 32*4 bpp (4 channels - float) /// PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, /// /// 4 bpp (no alpha) /// PIXELFORMAT_COMPRESSED_DXT1_RGB, /// /// 4 bpp (1 bit alpha) /// PIXELFORMAT_COMPRESSED_DXT1_RGBA, /// /// 8 bpp /// PIXELFORMAT_COMPRESSED_DXT3_RGBA, /// /// 8 bpp /// PIXELFORMAT_COMPRESSED_DXT5_RGBA, /// /// 4 bpp /// PIXELFORMAT_COMPRESSED_ETC1_RGB, /// /// 4 bpp /// PIXELFORMAT_COMPRESSED_ETC2_RGB, /// /// 8 bpp /// PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA, /// /// 4 bpp /// PIXELFORMAT_COMPRESSED_PVRT_RGB, /// /// 4 bpp /// PIXELFORMAT_COMPRESSED_PVRT_RGBA, /// /// 8 bpp /// PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA, /// /// 2 bpp /// PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA } /// /// Image, pixel data stored in CPU memory (RAM) /// [StructLayout(LayoutKind.Sequential)] public unsafe partial struct Image { /// /// Image raw data /// public void* data; /// /// Image base width /// public int width; /// /// Image base height /// public int height; /// /// Mipmap levels, 1 by default /// public int mipmaps; /// /// Data format (PixelFormat type) /// public PixelFormat format; } }