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
Type | Name | Description |
---|---|---|
EncoderBC15::Mode | mode | Compression mode. |
Texture | dest | Destination proxy texture. |
Texture | src | Source texture to compress. |
Slice | dest_slice | Destination texture slice. |
Slice | src_slice | Source texture slice. |
Enums
Mode
Encoder modes.
Name | Value |
---|---|
ModeBC1RGBu8n | 0 |
ModeBC2RGBAu8n | 1 |
ModeBC3RGBAu8n | 2 |
ModeBC4Ru8n | 3 |
ModeBC5RGu8n | 4 |
NumModes | 5 |
Flags
Encoder flags.
Name | Value |
---|---|
FlagNone | 0 |
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) |