this.pixelWidth=oppositeEndianess?this.switchEndainness(header[6]):header[6];// level 0 value of arg passed to gl.compressedTexImage2D(,,,x,,,)
this.pixelHeight=oppositeEndianess?this.switchEndainness(header[7]):header[7];// level 0 value of arg passed to gl.compressedTexImage2D(,,,,x,,)
this.pixelDepth=oppositeEndianess?this.switchEndainness(header[8]):header[8];// level 0 value of arg passed to gl.compressedTexImage3D(,,,,,x,,)
this.numberOfArrayElements=oppositeEndianess?this.switchEndainness(header[9]):header[9];// used for texture arrays
this.numberOfFaces=oppositeEndianess?this.switchEndainness(header[10]):header[10];// used for cubemap textures, should either be 1 or 6
this.numberOfMipmapLevels=oppositeEndianess?this.switchEndainness(header[11]):header[11];// number of levels; disregard possibility of 0 for compressed textures
this.bytesOfKeyValueData=oppositeEndianess?this.switchEndainness(header[12]):header[12];// the amount of space after the header for meta-data
// Make sure we have a compressed type. Not only reduces work, but probably better to let dev know they are not compressing.
if(this.glType!==0){
console.warn('only compressed formats currently supported');
return;
}else{
// value of zero is an indication to generate mipmaps @ runtime. Not usually allowed for compressed, so disregard.