nCine::TextureFormat class

Texture format.

Public static functions

static auto calculateMipSizes(GLenum internalFormat, int width, int height, int mipMapCount, unsigned long* mipDataOffsets, unsigned long* mipDataSizes) -> unsigned long
Calculates the pixel data size for each MIP map level.

Constructors, destructors, conversion operators

TextureFormat()
TextureFormat(GLenum internalFormat) explicit
TextureFormat(GLenum internalFormat, GLenum type)

Public functions

auto internalFormat() const -> GLenum
Returns the specified internal format.
auto format() const -> GLenum
Returns the corresponding format.
auto type() const -> GLenum
Returns the corresponding pixel data type.
auto isCompressed() const -> bool
Returns true if the format holds compressed data.
auto numChannels() const -> unsigned int
Returns the number of color channels.
void bgrFormat()
Converts the external format to the corresponding BGR one.