From 8e3de6b5653ea7087a248b3eb2a4aea6067688b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 20 Jul 2021 19:19:39 +0800 Subject: update --- meta/3rd/love2d/library/love.image.lua | 544 ++++++++++++++++++++++++++------- 1 file changed, 440 insertions(+), 104 deletions(-) (limited to 'meta/3rd/love2d/library/love.image.lua') diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua index 3ec51b98..6e36e8e8 100644 --- a/meta/3rd/love2d/library/love.image.lua +++ b/meta/3rd/love2d/library/love.image.lua @@ -1,5 +1,6 @@ ---@meta +-- version: nil ---@class love.image love.image = {} @@ -25,6 +26,13 @@ function love.image.newCompressedData(filename) end ---@return love.ImageData imageData # The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero. function love.image.newImageData(width, height) end +--- +---Represents compressed image data designed to stay compressed in RAM. +--- +---CompressedImageData encompasses standard compressed texture formats such as DXT1, DXT5, and BC5 / 3Dc. +--- +---You can't draw CompressedImageData directly to the screen. See Image for that. +--- ---@class love.CompressedImageData: love.Data, love.Object local CompressedImageData = {} @@ -59,6 +67,11 @@ function CompressedImageData:getMipmapCount() end ---@return number width # The width of the CompressedImageData. function CompressedImageData:getWidth() end +--- +---Raw (decoded) image data. +--- +---You can't draw ImageData directly to screen. See Image for that. +--- ---@class love.ImageData: love.Data, love.Object local ImageData = {} @@ -145,112 +158,435 @@ function ImageData:paste(source, dx, dy, sx, sy, sw, sh) end --- function ImageData:setPixel() end +--- +---Compressed image data formats. Here and here are a couple overviews of many of the formats. +--- +---Unlike traditional PNG or jpeg, these formats stay compressed in RAM and in the graphics card's VRAM. This is good for saving memory space as well as improving performance, since the graphics card will be able to keep more of the image's pixels in its fast-access cache when drawing it. +--- ---@class love.CompressedImageFormat ----@field DXT1 integer # The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. ----@field DXT3 integer # The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. ----@field DXT5 integer # The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. ----@field BC4 integer # The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. ----@field BC4s integer # The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ----@field BC5 integer # The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. ----@field BC5s integer # The signed variant of the BC5 format. ----@field BC6h integer # The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. ----@field BC6hs integer # The signed variant of the BC6H format. Stores RGB data in the range of +65504. ----@field BC7 integer # The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. ----@field ETC1 integer # The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. ----@field ETC2rgb integer # The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. ----@field ETC2rgba integer # The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. ----@field ETC2rgba1 integer # The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. ----@field EACr integer # The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. ----@field EACrs integer # The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ----@field EACrg integer # The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. ----@field EACrgs integer # The signed two-channel variant of the EAC format. ----@field PVR1rgb2 integer # The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. ----@field PVR1rgb4 integer # The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. ----@field PVR1rgba2 integer # The 2 bit per pixel RGBA variant of the PVRTC1 format. ----@field PVR1rgba4 integer # The 4 bit per pixel RGBA variant of the PVRTC1 format. ----@field ASTC4x4 integer # The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. ----@field ASTC5x4 integer # The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. ----@field ASTC5x5 integer # The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. ----@field ASTC6x5 integer # The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. ----@field ASTC6x6 integer # The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. ----@field ASTC8x5 integer # The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. ----@field ASTC8x6 integer # The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. ----@field ASTC8x8 integer # The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. ----@field ASTC10x5 integer # The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. ----@field ASTC10x6 integer # The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. ----@field ASTC10x8 integer # The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. ----@field ASTC10x10 integer # The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. ----@field ASTC12x10 integer # The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. ----@field ASTC12x12 integer # The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. +--- +---The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. +--- +---@field DXT1 integer +--- +---The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. +--- +---@field DXT3 integer +--- +---The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. +--- +---@field DXT5 integer +--- +---The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. +--- +---@field BC4 integer +--- +---The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. +--- +---@field BC4s integer +--- +---The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. +--- +---@field BC5 integer +--- +---The signed variant of the BC5 format. +--- +---@field BC5s integer +--- +---The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. +--- +---@field BC6h integer +--- +---The signed variant of the BC6H format. Stores RGB data in the range of +65504. +--- +---@field BC6hs integer +--- +---The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. +--- +---@field BC7 integer +--- +---The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. +--- +---@field ETC1 integer +--- +---The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. +--- +---@field ETC2rgb integer +--- +---The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. +--- +---@field ETC2rgba integer +--- +---The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. +--- +---@field ETC2rgba1 integer +--- +---The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. +--- +---@field EACr integer +--- +---The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. +--- +---@field EACrs integer +--- +---The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. +--- +---@field EACrg integer +--- +---The signed two-channel variant of the EAC format. +--- +---@field EACrgs integer +--- +---The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. +--- +---@field PVR1rgb2 integer +--- +---The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. +--- +---@field PVR1rgb4 integer +--- +---The 2 bit per pixel RGBA variant of the PVRTC1 format. +--- +---@field PVR1rgba2 integer +--- +---The 4 bit per pixel RGBA variant of the PVRTC1 format. +--- +---@field PVR1rgba4 integer +--- +---The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. +--- +---@field ASTC4x4 integer +--- +---The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. +--- +---@field ASTC5x4 integer +--- +---The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. +--- +---@field ASTC5x5 integer +--- +---The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. +--- +---@field ASTC6x5 integer +--- +---The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. +--- +---@field ASTC6x6 integer +--- +---The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. +--- +---@field ASTC8x5 integer +--- +---The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. +--- +---@field ASTC8x6 integer +--- +---The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. +--- +---@field ASTC8x8 integer +--- +---The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. +--- +---@field ASTC10x5 integer +--- +---The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. +--- +---@field ASTC10x6 integer +--- +---The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. +--- +---@field ASTC10x8 integer +--- +---The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. +--- +---@field ASTC10x10 integer +--- +---The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. +--- +---@field ASTC12x10 integer +--- +---The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. +--- +---@field ASTC12x12 integer +--- +---Encoded image formats. +--- ---@class love.ImageFormat ----@field tga integer # Targa image format. ----@field png integer # PNG image format. ----@field jpg integer # JPG image format. ----@field bmp integer # BMP image format. +--- +---Targa image format. +--- +---@field tga integer +--- +---PNG image format. +--- +---@field png integer +--- +---JPG image format. +--- +---@field jpg integer +--- +---BMP image format. +--- +---@field bmp integer +--- +---Pixel formats for Textures, ImageData, and CompressedImageData. +--- ---@class love.PixelFormat ----@field unknown integer # Indicates unknown pixel format, used internally. ----@field normal integer # Alias for rgba8, or srgba8 if gamma-correct rendering is enabled. ----@field hdr integer # A format suitable for high dynamic range content - an alias for the rgba16f format, normally. ----@field r8 integer # Single-channel (red component) format (8 bpp). ----@field rg8 integer # Two channels (red and green components) with 8 bits per channel (16 bpp). ----@field rgba8 integer # 8 bits per channel (32 bpp) RGBA. Color channel values range from 0-255 (0-1 in shaders). ----@field srgba8 integer # gamma-correct version of rgba8. ----@field r16 integer # Single-channel (red component) format (16 bpp). ----@field rg16 integer # Two channels (red and green components) with 16 bits per channel (32 bpp). ----@field rgba16 integer # 16 bits per channel (64 bpp) RGBA. Color channel values range from 0-65535 (0-1 in shaders). ----@field r16f integer # Floating point single-channel format (16 bpp). Color values can range from [-65504, +65504]. ----@field rg16f integer # Floating point two-channel format with 16 bits per channel (32 bpp). Color values can range from [-65504, +65504]. ----@field rgba16f integer # Floating point RGBA with 16 bits per channel (64 bpp). Color values can range from [-65504, +65504]. ----@field r32f integer # Floating point single-channel format (32 bpp). ----@field rg32f integer # Floating point two-channel format with 32 bits per channel (64 bpp). ----@field rgba32f integer # Floating point RGBA with 32 bits per channel (128 bpp). ----@field la8 integer # Same as rg8, but accessed as (L, L, L, A) ----@field rgba4 integer # 4 bits per channel (16 bpp) RGBA. ----@field rgb5a1 integer # RGB with 5 bits each, and a 1-bit alpha channel (16 bpp). ----@field rgb565 integer # RGB with 5, 6, and 5 bits each, respectively (16 bpp). There is no alpha channel in this format. ----@field rgb10a2 integer # RGB with 10 bits per channel, and a 2-bit alpha channel (32 bpp). ----@field rg11b10f integer # Floating point RGB with 11 bits in the red and green channels, and 10 bits in the blue channel (32 bpp). There is no alpha channel. Color values can range from [0, +65024]. ----@field stencil8 integer # No depth buffer and 8-bit stencil buffer. ----@field depth16 integer # 16-bit depth buffer and no stencil buffer. ----@field depth24 integer # 24-bit depth buffer and no stencil buffer. ----@field depth32f integer # 32-bit float depth buffer and no stencil buffer. ----@field depth24stencil8 integer # 24-bit depth buffer and 8-bit stencil buffer. ----@field depth32fstencil8 integer # 32-bit float depth buffer and 8-bit stencil buffer. ----@field DXT1 integer # The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. ----@field DXT3 integer # The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. ----@field DXT5 integer # The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. ----@field BC4 integer # The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. ----@field BC4s integer # The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ----@field BC5 integer # The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. ----@field BC5s integer # The signed variant of the BC5 format. ----@field BC6h integer # The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. ----@field BC6hs integer # The signed variant of the BC6H format. Stores RGB data in the range of +65504. ----@field BC7 integer # The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. ----@field ETC1 integer # The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. ----@field ETC2rgb integer # The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. ----@field ETC2rgba integer # The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. ----@field ETC2rgba1 integer # The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. ----@field EACr integer # The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. ----@field EACrs integer # The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ----@field EACrg integer # The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. ----@field EACrgs integer # The signed two-channel variant of the EAC format. ----@field PVR1rgb2 integer # The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. ----@field PVR1rgb4 integer # The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. ----@field PVR1rgba2 integer # The 2 bit per pixel RGBA variant of the PVRTC1 format. ----@field PVR1rgba4 integer # The 4 bit per pixel RGBA variant of the PVRTC1 format. ----@field ASTC4x4 integer # The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. ----@field ASTC5x4 integer # The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. ----@field ASTC5x5 integer # The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. ----@field ASTC6x5 integer # The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. ----@field ASTC6x6 integer # The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. ----@field ASTC8x5 integer # The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. ----@field ASTC8x6 integer # The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. ----@field ASTC8x8 integer # The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. ----@field ASTC10x5 integer # The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. ----@field ASTC10x6 integer # The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. ----@field ASTC10x8 integer # The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. ----@field ASTC10x10 integer # The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. ----@field ASTC12x10 integer # The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. ----@field ASTC12x12 integer # The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. +--- +---Indicates unknown pixel format, used internally. +--- +---@field unknown integer +--- +---Alias for rgba8, or srgba8 if gamma-correct rendering is enabled. +--- +---@field normal integer +--- +---A format suitable for high dynamic range content - an alias for the rgba16f format, normally. +--- +---@field hdr integer +--- +---Single-channel (red component) format (8 bpp). +--- +---@field r8 integer +--- +---Two channels (red and green components) with 8 bits per channel (16 bpp). +--- +---@field rg8 integer +--- +---8 bits per channel (32 bpp) RGBA. Color channel values range from 0-255 (0-1 in shaders). +--- +---@field rgba8 integer +--- +---gamma-correct version of rgba8. +--- +---@field srgba8 integer +--- +---Single-channel (red component) format (16 bpp). +--- +---@field r16 integer +--- +---Two channels (red and green components) with 16 bits per channel (32 bpp). +--- +---@field rg16 integer +--- +---16 bits per channel (64 bpp) RGBA. Color channel values range from 0-65535 (0-1 in shaders). +--- +---@field rgba16 integer +--- +---Floating point single-channel format (16 bpp). Color values can range from [-65504, +65504]. +--- +---@field r16f integer +--- +---Floating point two-channel format with 16 bits per channel (32 bpp). Color values can range from [-65504, +65504]. +--- +---@field rg16f integer +--- +---Floating point RGBA with 16 bits per channel (64 bpp). Color values can range from [-65504, +65504]. +--- +---@field rgba16f integer +--- +---Floating point single-channel format (32 bpp). +--- +---@field r32f integer +--- +---Floating point two-channel format with 32 bits per channel (64 bpp). +--- +---@field rg32f integer +--- +---Floating point RGBA with 32 bits per channel (128 bpp). +--- +---@field rgba32f integer +--- +---Same as rg8, but accessed as (L, L, L, A) +--- +---@field la8 integer +--- +---4 bits per channel (16 bpp) RGBA. +--- +---@field rgba4 integer +--- +---RGB with 5 bits each, and a 1-bit alpha channel (16 bpp). +--- +---@field rgb5a1 integer +--- +---RGB with 5, 6, and 5 bits each, respectively (16 bpp). There is no alpha channel in this format. +--- +---@field rgb565 integer +--- +---RGB with 10 bits per channel, and a 2-bit alpha channel (32 bpp). +--- +---@field rgb10a2 integer +--- +---Floating point RGB with 11 bits in the red and green channels, and 10 bits in the blue channel (32 bpp). There is no alpha channel. Color values can range from [0, +65024]. +--- +---@field rg11b10f integer +--- +---No depth buffer and 8-bit stencil buffer. +--- +---@field stencil8 integer +--- +---16-bit depth buffer and no stencil buffer. +--- +---@field depth16 integer +--- +---24-bit depth buffer and no stencil buffer. +--- +---@field depth24 integer +--- +---32-bit float depth buffer and no stencil buffer. +--- +---@field depth32f integer +--- +---24-bit depth buffer and 8-bit stencil buffer. +--- +---@field depth24stencil8 integer +--- +---32-bit float depth buffer and 8-bit stencil buffer. +--- +---@field depth32fstencil8 integer +--- +---The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. +--- +---@field DXT1 integer +--- +---The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. +--- +---@field DXT3 integer +--- +---The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. +--- +---@field DXT5 integer +--- +---The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. +--- +---@field BC4 integer +--- +---The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. +--- +---@field BC4s integer +--- +---The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. +--- +---@field BC5 integer +--- +---The signed variant of the BC5 format. +--- +---@field BC5s integer +--- +---The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. +--- +---@field BC6h integer +--- +---The signed variant of the BC6H format. Stores RGB data in the range of +65504. +--- +---@field BC6hs integer +--- +---The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. +--- +---@field BC7 integer +--- +---The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. +--- +---@field ETC1 integer +--- +---The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. +--- +---@field ETC2rgb integer +--- +---The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. +--- +---@field ETC2rgba integer +--- +---The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. +--- +---@field ETC2rgba1 integer +--- +---The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. +--- +---@field EACr integer +--- +---The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. +--- +---@field EACrs integer +--- +---The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. +--- +---@field EACrg integer +--- +---The signed two-channel variant of the EAC format. +--- +---@field EACrgs integer +--- +---The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. +--- +---@field PVR1rgb2 integer +--- +---The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. +--- +---@field PVR1rgb4 integer +--- +---The 2 bit per pixel RGBA variant of the PVRTC1 format. +--- +---@field PVR1rgba2 integer +--- +---The 4 bit per pixel RGBA variant of the PVRTC1 format. +--- +---@field PVR1rgba4 integer +--- +---The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. +--- +---@field ASTC4x4 integer +--- +---The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. +--- +---@field ASTC5x4 integer +--- +---The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. +--- +---@field ASTC5x5 integer +--- +---The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. +--- +---@field ASTC6x5 integer +--- +---The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. +--- +---@field ASTC6x6 integer +--- +---The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. +--- +---@field ASTC8x5 integer +--- +---The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. +--- +---@field ASTC8x6 integer +--- +---The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. +--- +---@field ASTC8x8 integer +--- +---The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. +--- +---@field ASTC10x5 integer +--- +---The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. +--- +---@field ASTC10x6 integer +--- +---The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. +--- +---@field ASTC10x8 integer +--- +---The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. +--- +---@field ASTC10x10 integer +--- +---The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. +--- +---@field ASTC12x10 integer +--- +---The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. +--- +---@field ASTC12x12 integer -- cgit v1.2.3