
318 IV Mobile Devices
struct astc_header
{
uint8_t magic [4];
uint8_t blockdim_x ;
uint8_t blockdim_y ;
uint8_t blockdim_z ;
uint8_t xsize [3];
uint8_t ysize [3];
uint8_t zsize [3];
};
Listing 6.1. ASTC header structure.
texture formats and as such can be used to test ASTC-based programs on a
standard desktop GPU.
Loading a texture in ASTC format is no different from loading other com-
pressed texture formats, but the correct internal format must be used. Files
output by the compressor have a data header containing everything needed to
load the compressed texture.
Using the data structure in Listing 6.1, the application can detect the impor-
tant information