Skip to main content

EncoderBC15

The EncoderBC15 class implements GPU-based texture compression using BC1-BC5 (S3TC) formats, supporting both color (RGB/RGBA) and single or dual-channel compression modes.

#include <graphics/TellusimEncoderBC15.h>

Constructors

EncoderBC15()

Methods

Clear encoder.

void clear()

Check encoder.

bool isCreated(Mode mode) const

Create encoder.

bool create(const Device &device, Mode mode)
bool create(const Device &device, Flags flags)

Dispatch texture encoder.

bool dispatch(Compute &compute, Mode mode, Texture &dest, Texture &src, Slice dest_slice, Slice src_slice) const
bool dispatch(Compute &compute, Mode mode, Texture &dest, Texture &src, Slice src_slice) const
bool dispatch(Compute &compute, Mode mode, Texture &dest, Texture &src) const
TypeNameDescription
EncoderBC15::ModemodeCompression mode.
TexturedestDestination proxy texture.
TexturesrcSource texture to compress.
Slicedest_sliceDestination texture slice.
Slicesrc_sliceSource texture slice.

Enums

Mode

Encoder modes.

NameValue
ModeBC1RGBu8n0
ModeBC2RGBAu8n1
ModeBC3RGBAu8n2
ModeBC4Ru8n3
ModeBC5RGu8n4
NumModes5

Flags

Encoder flags.

NameValue
FlagNone0
FlagBC1RGBu8n(1 << ModeBC1RGBu8n)
FlagBC2RGBAu8n(1 << ModeBC2RGBAu8n)
FlagBC3RGBAu8n(1 << ModeBC3RGBAu8n)
FlagBC4Ru8n(1 << ModeBC4Ru8n)
FlagBC5RGu8n(1 << ModeBC5RGu8n)
FlagCube(1 << (NumModes + 1))
FlagsBC13(FlagBC1RGBu8n | FlagBC2RGBAu8n | FlagBC3RGBAu8n)
FlagsBC45(FlagBC4Ru8n | FlagBC5RGu8n)
FlagsAll(FlagsBC13 | FlagsBC45)