Struct TextureFormat

Describes the format and layout of a texture.

struct TextureFormat;

Fields

NameTypeDescription
blockSize uintFor compressed formats, this should be the size of a 4x4 pixel block in bytes. For uncompressed formats, this should be zero.
cubeFaces uintBitwise combination of CubeFaceBit members.
format uintOpenGL texture format (GL_RGBA, etc).
internalFormat intOpenGL internal format (GL_RGBA8, etc).
pixelType uintOpenGL pixel type (GL_UNSIGNED_BYTE, etc).
target uintOpenGL texture target (GL_TEXTURE_2D, etc).

Properties

NameTypeDescription
channelSize[get] uintReturns the size of a single channel in bytes.
dimension[get] TextureDimensionReturns the texture dimension.
isCompressed[get] boolReturns true if the format is compressed.
isCubemap[get] boolReturns true if the format is a cube map.
numChannels[get] uintReturns the number of channels.
pixelSize[get] uintReturns the size of a pixel in bytes.