#[repr(u32)]
pub enum TextureFormat {
Show 86 variants BC1, BC2, BC3, BC4, BC5, BC6H, BC7, ETC1, ETC2, ETC2A, ETC2A1, PTC12, PTC14, PTC12A, PTC14A, PTC22, PTC24, ATC, ATCE, ATCI, ASTC4x4, ASTC5x5, ASTC6x6, ASTC8x5, ASTC8x6, ASTC10x5, Unknown, R1, A8, R8, R8I, R8U, R8S, R16, R16I, R16U, R16F, R16S, R32I, R32U, R32F, RG8, RG8I, RG8U, RG8S, RG16, RG16I, RG16U, RG16F, RG16S, RG32I, RG32U, RG32F, RGB8, RGB8I, RGB8U, RGB8S, RGB9E5F, BGRA8, RGBA8, RGBA8I, RGBA8U, RGBA8S, RGBA16, RGBA16I, RGBA16U, RGBA16F, RGBA16S, RGBA32I, RGBA32U, RGBA32F, R5G6B5, RGBA4, RGB5A1, RGB10A2, RG11B10F, UnknownDepth, D16, D24, D24S8, D32, D16F, D24F, D32F, D0S8, Count,
}
Expand description

Texture format enum.

Notation:

  RGBA16S
  ^   ^ ^
  |   | +-- [ ]Unorm
  |   |     [F]loat
  |   |     [S]norm
  |   |     [I]nt
  |   |     [U]int
  |   +---- Number of bits per component
  +-------- Components

@attention Availability depends on Caps (see: formats).

Variants

BC1

DXT1 R5G6B5A1

BC2

DXT3 R5G6B5A4

BC3

DXT5 R5G6B5A8

BC4

LATC1/ATI1 R8

BC5

LATC2/ATI2 RG8

BC6H

BC6H RGB16F

BC7

BC7 RGB 4-7 bits per color channel, 0-8 bits alpha

ETC1

ETC1 RGB8

ETC2

ETC2 RGB8

ETC2A

ETC2 RGBA8

ETC2A1

ETC2 RGB8A1

PTC12

PVRTC1 RGB 2BPP

PTC14

PVRTC1 RGB 4BPP

PTC12A

PVRTC1 RGBA 2BPP

PTC14A

PVRTC1 RGBA 4BPP

PTC22

PVRTC2 RGBA 2BPP

PTC24

PVRTC2 RGBA 4BPP

ATC

ATC RGB 4BPP

ATCE

ATCE RGBA 8 BPP explicit alpha

ATCI

ATCI RGBA 8 BPP interpolated alpha

ASTC4x4

ASTC 4x4 8.0 BPP

ASTC5x5

ASTC 5x5 5.12 BPP

ASTC6x6

ASTC 6x6 3.56 BPP

ASTC8x5

ASTC 8x5 3.20 BPP

ASTC8x6

ASTC 8x6 2.67 BPP

ASTC10x5

ASTC 10x5 2.56 BPP

Unknown

Compressed formats above.

R1

A8

R8

R8I

R8U

R8S

R16

R16I

R16U

R16F

R16S

R32I

R32U

R32F

RG8

RG8I

RG8U

RG8S

RG16

RG16I

RG16U

RG16F

RG16S

RG32I

RG32U

RG32F

RGB8

RGB8I

RGB8U

RGB8S

RGB9E5F

BGRA8

RGBA8

RGBA8I

RGBA8U

RGBA8S

RGBA16

RGBA16I

RGBA16U

RGBA16F

RGBA16S

RGBA32I

RGBA32U

RGBA32F

R5G6B5

RGBA4

RGB5A1

RGB10A2

RG11B10F

UnknownDepth

Depth formats below.

D16

D24

D24S8

D32

D16F

D24F

D32F

D0S8

Count

Number of entries in the enum

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.