+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfLuminance12Alpha4;
+ fWithAlpha := tfLuminance12Alpha4;
+ fWithoutAlpha := tfLuminance16;
+ fOpenGLFormat := tfLuminance12Alpha4;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fRange.a := $FFFF;
+ fShift.r := 0;
+ fShift.g := 0;
+ fShift.b := 0;
+ fShift.a := 16;
+ fglFormat := GL_LUMINANCE_ALPHA;
+ fglInternalFormat := GL_LUMINANCE12_ALPHA4;
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;
+
+constructor TfdLuminance16Alpha16.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfLuminance16Alpha16;
+ fWithAlpha := tfLuminance16Alpha16;
+ fWithoutAlpha := tfLuminance16;
+ fOpenGLFormat := tfLuminance16Alpha16;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fRange.a := $FFFF;
+ fShift.r := 0;
+ fShift.g := 0;
+ fShift.b := 0;
+ fShift.a := 16;
+ fglFormat := GL_LUMINANCE_ALPHA;
+ fglInternalFormat := GL_LUMINANCE16_ALPHA16;
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;
+
+constructor TfdR3G3B2.Create;
+begin
+ inherited Create;
+ fPixelSize := 1.0;
+ fFormat := tfR3G3B2;
+ fWithAlpha := tfRGBA4;
+ fWithoutAlpha := tfR3G3B2;
+ fOpenGLFormat := tfR3G3B2;
+ fRGBInverted := tfEmpty;
+ fRange.r := $07;
+ fRange.g := $07;
+ fRange.b := $04;
+ fShift.r := 5;
+ fShift.g := 2;
+ fShift.b := 0;
+ fglFormat := GL_RGB;
+ fglInternalFormat := GL_R3_G3_B2;
+ fglDataFormat := GL_UNSIGNED_BYTE_3_3_2;
+end;
+
+constructor TfdRGBX4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfRGBX4;
+ fWithAlpha := tfRGBA4;
+ fWithoutAlpha := tfRGBX4;
+ fOpenGLFormat := tfRGBX4;
+ fRGBInverted := tfBGRX4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fRange.a := $00;
+ fShift.r := 12;
+ fShift.g := 8;
+ fShift.b := 4;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4;
+end;
+
+constructor TfdXRGB4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfXRGB4;
+ fWithAlpha := tfARGB4;
+ fWithoutAlpha := tfXRGB4;
+ fOpenGLFormat := tfXRGB4;
+ fRGBInverted := tfXBGR4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fShift.r := 8;
+ fShift.g := 4;
+ fShift.b := 0;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4_REV;
+end;
+
+constructor TfdR5G6B5.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfR5G6B5;
+ fWithAlpha := tfRGB5A1;
+ fWithoutAlpha := tfR5G6B5;
+ fOpenGLFormat := tfR5G6B5;
+ fRGBInverted := tfB5G6R5;
+ fRange.r := $1F;
+ fRange.g := $3F;
+ fRange.b := $1F;
+ fShift.r := 11;
+ fShift.g := 5;
+ fShift.b := 0;
+ fglFormat := GL_RGB;
+ fglInternalFormat := GL_RGB565;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_6_5;
+end;
+
+constructor TfdRGB5X1.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfRGB5X1;
+ fWithAlpha := tfRGB5A1;
+ fWithoutAlpha := tfRGB5X1;
+ fOpenGLFormat := tfRGB5X1;
+ fRGBInverted := tfBGR5X1;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fShift.r := 11;
+ fShift.g := 6;
+ fShift.b := 1;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB5;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_5_5_1;
+end;
+
+constructor TfdX1RGB5.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfX1RGB5;
+ fWithAlpha := tfA1RGB5;
+ fWithoutAlpha := tfX1RGB5;
+ fOpenGLFormat := tfX1RGB5;
+ fRGBInverted := tfX1BGR5;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fShift.r := 10;
+ fShift.g := 5;
+ fShift.b := 0;
+ fglFormat := GL_BGRA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB5;
+ fglDataFormat := GL_UNSIGNED_SHORT_1_5_5_5_REV;
+end;
+
+constructor TfdRGB8.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfRGB8;
+ fWithAlpha := tfRGBA8;
+ fWithoutAlpha := tfRGB8;
+ fOpenGLFormat := tfRGB8;
+ fRGBInverted := tfBGR8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fShift.r := 16;
+ fShift.g := 8;
+ fShift.b := 0;
+ fglFormat := GL_BGR; // reverse byte order to match little endianess
+ fglInternalFormat := GL_RGB8; // as if u interpret the 3 bytes as unsigned integer
+ fglDataFormat := GL_UNSIGNED_BYTE;
+end;
+
+constructor TfdRGBX8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfRGBX8;
+ fWithAlpha := tfRGBA8;
+ fWithoutAlpha := tfRGBX8;
+ fOpenGLFormat := tfRGB8;
+ fRGBInverted := tfBGRX8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fShift.r := 24;
+ fShift.g := 16;
+ fShift.b := 8;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8;
+end;
+
+constructor TfdXRGB8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfXRGB8;
+ fWithAlpha := tfXRGB8;
+ fWithoutAlpha := tfXRGB8;
+ fOpenGLFormat := tfRGB8;
+ fRGBInverted := tfXBGR8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fShift.r := 16;
+ fShift.g := 8;
+ fShift.b := 0;
+ fglFormat := GL_BGRA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8_REV;
+end;
+
+constructor TfdRGB10X2.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfRGB10X2;
+ fWithAlpha := tfRGB10A2;
+ fWithoutAlpha := tfRGB10X2;
+ fOpenGLFormat := tfRGB10X2;
+ fRGBInverted := tfBGR10X2;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fShift.r := 22;
+ fShift.g := 12;
+ fShift.b := 2;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB10;
+ fglDataFormat := GL_UNSIGNED_INT_10_10_10_2;
+end;
+
+constructor TfdX2RGB10.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfX2RGB10;
+ fWithAlpha := tfA2RGB10;
+ fWithoutAlpha := tfX2RGB10;
+ fOpenGLFormat := tfX2RGB10;
+ fRGBInverted := tfX2BGR10;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fShift.r := 20;
+ fShift.g := 10;
+ fShift.b := 0;
+ fglFormat := GL_BGRA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB10;
+ fglDataFormat := GL_UNSIGNED_INT_2_10_10_10_REV;
+end;
+
+constructor TfdRGB16.Create;
+begin
+ inherited Create;
+ fPixelSize := 6.0;
+ fFormat := tfRGB16;
+ fWithAlpha := tfRGBA16;
+ fWithoutAlpha := tfRGB16;
+ fOpenGLFormat := tfRGB16;
+ fRGBInverted := tfBGR16;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fShift.r := 32;
+ fShift.g := 16;
+ fShift.b := 0;
+ fglFormat := GL_BGR; // reverse byte order to match little endianess
+ fglInternalFormat := GL_RGB16; // as if u interpret the 3 bytes as unsigned integer
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;
+
+constructor TfdRGBA4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfRGBA4;
+ fWithAlpha := tfRGBA4;
+ fWithoutAlpha := tfRGBX4;
+ fOpenGLFormat := tfRGBA4;
+ fRGBInverted := tfBGRA4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fRange.a := $0F;
+ fShift.r := 12;
+ fShift.g := 8;
+ fShift.b := 4;
+ fShift.a := 0;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGBA4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4;
+end;
+
+constructor TfdARGB4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfARGB4;
+ fWithAlpha := tfARGB4;
+ fWithoutAlpha := tfXRGB4;
+ fOpenGLFormat := tfARGB4;
+ fRGBInverted := tfABGR4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fRange.a := $0F;
+ fShift.r := 8;
+ fShift.g := 4;
+ fShift.b := 0;
+ fShift.a := 12;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGBA4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4_REV;
+end;
+
+constructor TfdRGB5A1.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfRGB5A1;
+ fWithAlpha := tfRGB5A1;
+ fWithoutAlpha := tfRGB5X1;
+ fOpenGLFormat := tfRGB5A1;
+ fRGBInverted := tfBGR5A1;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fRange.a := $01;
+ fShift.r := 11;
+ fShift.g := 6;
+ fShift.b := 1;
+ fShift.a := 0;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGB5_A1;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_5_5_1;
+end;
+
+constructor TfdA1RGB5.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfA1RGB5;
+ fWithAlpha := tfA1RGB5;
+ fWithoutAlpha := tfX1RGB5;
+ fOpenGLFormat := tfA1RGB5;
+ fRGBInverted := tfA1BGR5;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fRange.a := $01;
+ fShift.r := 10;
+ fShift.g := 5;
+ fShift.b := 0;
+ fShift.a := 15;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB5_A1;
+ fglDataFormat := GL_UNSIGNED_SHORT_1_5_5_5_REV;
+end;
+
+constructor TfdRGBA8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfRGBA8;
+ fWithAlpha := tfRGBA8;
+ fWithoutAlpha := tfRGB8;
+ fOpenGLFormat := tfRGBA8;
+ fRGBInverted := tfBGRA8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fRange.a := $FF;
+ fShift.r := 24;
+ fShift.g := 16;
+ fShift.b := 8;
+ fShift.a := 0;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGBA8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8;
+end;
+
+constructor TfdARGB8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfARGB8;
+ fWithAlpha := tfARGB8;
+ fWithoutAlpha := tfRGB8;
+ fOpenGLFormat := tfARGB8;
+ fRGBInverted := tfABGR8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fRange.a := $FF;
+ fShift.r := 16;
+ fShift.g := 8;
+ fShift.b := 0;
+ fShift.a := 24;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGBA8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8_REV;
+end;
+
+constructor TfdRGB10A2.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfRGB10A2;
+ fWithAlpha := tfRGB10A2;
+ fWithoutAlpha := tfRGB10X2;
+ fOpenGLFormat := tfRGB10A2;
+ fRGBInverted := tfBGR10A2;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fRange.a := $0003;
+ fShift.r := 22;
+ fShift.g := 12;
+ fShift.b := 2;
+ fShift.a := 0;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_10_10_10_2;
+end;
+
+constructor TfdA2RGB10.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfA2RGB10;
+ fWithAlpha := tfA2RGB10;
+ fWithoutAlpha := tfX2RGB10;
+ fOpenGLFormat := tfA2RGB10;
+ fRGBInverted := tfA2BGR10;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fRange.a := $0003;
+ fShift.r := 20;
+ fShift.g := 10;
+ fShift.b := 0;
+ fShift.a := 30;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_2_10_10_10_REV;
+end;
+
+constructor TfdRGBA16.Create;
+begin
+ inherited Create;
+ fPixelSize := 8.0;
+ fFormat := tfRGBA16;
+ fWithAlpha := tfRGBA16;
+ fWithoutAlpha := tfRGB16;
+ fOpenGLFormat := tfRGBA16;
+ fRGBInverted := tfBGRA16;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fRange.a := $FFFF;
+ fShift.r := 48;
+ fShift.g := 32;
+ fShift.b := 16;
+ fShift.a := 0;
+ fglFormat := GL_BGRA; // reverse byte order to match little endianess
+ fglInternalFormat := GL_RGBA16; // as if u interpret the 3 bytes as unsigned integer
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+constructor TfdBGRX4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfBGRX4;
+ fWithAlpha := tfBGRA4;
+ fWithoutAlpha := tfBGRX4;
+ fOpenGLFormat := tfBGRX4;
+ fRGBInverted := tfRGBX4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fShift.r := 4;
+ fShift.g := 8;
+ fShift.b := 12;
+ fglFormat := GL_BGRA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4;
+end;
+
+constructor TfdXBGR4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfXBGR4;
+ fWithAlpha := tfABGR4;
+ fWithoutAlpha := tfXBGR4;
+ fOpenGLFormat := tfXBGR4;
+ fRGBInverted := tfXRGB4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fRange.a := $0F;
+ fShift.r := 0;
+ fShift.g := 4;
+ fShift.b := 8;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4_REV;
+end;
+
+constructor TfdB5G6R5.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfB5G6R5;
+ fWithAlpha := tfBGR5A1;
+ fWithoutAlpha := tfB5G6R5;
+ fOpenGLFormat := tfB5G6R5;
+ fRGBInverted := tfR5G6B5;
+ fRange.r := $1F;
+ fRange.g := $3F;
+ fRange.b := $1F;
+ fShift.r := 0;
+ fShift.g := 5;
+ fShift.b := 11;
+ fglFormat := GL_RGB;
+ fglInternalFormat := GL_RGB565;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_6_5_REV;
+end;
+
+constructor TfdBGR5X1.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfBGR5X1;
+ fWithAlpha := tfBGR5A1;
+ fWithoutAlpha := tfBGR5X1;
+ fOpenGLFormat := tfBGR5X1;
+ fRGBInverted := tfRGB5X1;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fShift.r := 1;
+ fShift.g := 6;
+ fShift.b := 11;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB5;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_5_5_1;
+end;
+
+constructor TfdX1BGR5.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfX1BGR5;
+ fWithAlpha := tfA1BGR5;
+ fWithoutAlpha := tfX1BGR5;
+ fOpenGLFormat := tfX1BGR5;
+ fRGBInverted := tfX1RGB5;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fShift.r := 0;
+ fShift.g := 5;
+ fShift.b := 10;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB5;
+ fglDataFormat := GL_UNSIGNED_SHORT_1_5_5_5_REV;
+end;
+
+constructor TfdBGR8.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfBGR8;
+ fWithAlpha := tfBGRA8;
+ fWithoutAlpha := tfBGR8;
+ fOpenGLFormat := tfBGR8;
+ fRGBInverted := tfRGB8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fShift.r := 0;
+ fShift.g := 8;
+ fShift.b := 16;
+ fglFormat := GL_RGB; // reverse byte order to match little endianess
+ fglInternalFormat := GL_RGB8; // as if u interpret the 3 bytes as unsigned integer
+ fglDataFormat := GL_UNSIGNED_BYTE;
+end;
+
+constructor TfdBGRX8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfBGRX8;
+ fWithAlpha := tfBGRA8;
+ fWithoutAlpha := tfBGRX8;
+ fOpenGLFormat := tfBGRX8;
+ fRGBInverted := tfRGBX8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fShift.r := 8;
+ fShift.g := 16;
+ fShift.b := 24;
+ fglFormat := GL_BGRA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8;
+end;
+
+constructor TfdXBGR8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfXBGR8;
+ fWithAlpha := tfABGR8;
+ fWithoutAlpha := tfXBGR8;
+ fOpenGLFormat := tfXBGR8;
+ fRGBInverted := tfXRGB8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fShift.r := 0;
+ fShift.g := 8;
+ fShift.b := 16;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8_REV;
+end;
+
+constructor TfdBGR10X2.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfBGR10X2;
+ fWithAlpha := tfBGR10A2;
+ fWithoutAlpha := tfBGR10X2;
+ fOpenGLFormat := tfBGR10X2;
+ fRGBInverted := tfRGB10X2;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fShift.r := 2;
+ fShift.g := 12;
+ fShift.b := 22;
+ fglFormat := GL_BGRA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB10;
+ fglDataFormat := GL_UNSIGNED_INT_10_10_10_2;
+end;
+
+constructor TfdX2BGR10.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfX2BGR10;
+ fWithAlpha := tfA2BGR10;
+ fWithoutAlpha := tfX2BGR10;
+ fOpenGLFormat := tfX2BGR10;
+ fRGBInverted := tfX2RGB10;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fShift.r := 0;
+ fShift.g := 10;
+ fShift.b := 20;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB10;
+ fglDataFormat := GL_UNSIGNED_INT_2_10_10_10_REV;
+end;
+
+constructor TfdBGR16.Create;
+begin
+ inherited Create;
+ fPixelSize := 6.0;
+ fFormat := tfBGR16;
+ fWithAlpha := tfBGRA16;
+ fWithoutAlpha := tfBGR16;
+ fOpenGLFormat := tfBGR16;
+ fRGBInverted := tfRGB16;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fShift.r := 0;
+ fShift.g := 16;
+ fShift.b := 32;
+ fglFormat := GL_RGB; // reverse byte order to match little endianess
+ fglInternalFormat := GL_RGB16; // as if u interpret the 3 bytes as unsigned integer
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;
+
+constructor TfdBGRA4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfBGRA4;
+ fWithAlpha := tfBGRA4;
+ fWithoutAlpha := tfBGRX4;
+ fOpenGLFormat := tfBGRA4;
+ fRGBInverted := tfRGBA4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fRange.a := $0F;
+ fShift.r := 4;
+ fShift.g := 8;
+ fShift.b := 12;
+ fShift.a := 0;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGBA4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4;
+end;
+
+constructor TfdABGR4.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfABGR4;
+ fWithAlpha := tfABGR4;
+ fWithoutAlpha := tfXBGR4;
+ fOpenGLFormat := tfABGR4;
+ fRGBInverted := tfARGB4;
+ fRange.r := $0F;
+ fRange.g := $0F;
+ fRange.b := $0F;
+ fRange.a := $0F;
+ fShift.r := 0;
+ fShift.g := 4;
+ fShift.b := 8;
+ fShift.a := 12;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGBA4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4_REV;
+end;
+
+constructor TfdBGR5A1.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfBGR5A1;
+ fWithAlpha := tfBGR5A1;
+ fWithoutAlpha := tfBGR5X1;
+ fOpenGLFormat := tfBGR5A1;
+ fRGBInverted := tfRGB5A1;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fRange.a := $01;
+ fShift.r := 1;
+ fShift.g := 6;
+ fShift.b := 11;
+ fShift.a := 0;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB5_A1;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_5_5_1;
+end;
+
+constructor TfdA1BGR5.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfA1BGR5;
+ fWithAlpha := tfA1BGR5;
+ fWithoutAlpha := tfX1BGR5;
+ fOpenGLFormat := tfA1BGR5;
+ fRGBInverted := tfA1RGB5;
+ fRange.r := $1F;
+ fRange.g := $1F;
+ fRange.b := $1F;
+ fRange.a := $01;
+ fShift.r := 0;
+ fShift.g := 5;
+ fShift.b := 10;
+ fShift.a := 15;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGB5_A1;
+ fglDataFormat := GL_UNSIGNED_SHORT_1_5_5_5_REV;
+end;
+
+constructor TfdBGRA8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfBGRA8;
+ fWithAlpha := tfBGRA8;
+ fWithoutAlpha := tfBGR8;
+ fOpenGLFormat := tfBGRA8;
+ fRGBInverted := tfRGBA8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fRange.a := $FF;
+ fShift.r := 8;
+ fShift.g := 16;
+ fShift.b := 24;
+ fShift.a := 0;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGBA8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8;
+end;
+
+constructor TfdABGR8.Create;
+begin
+ inherited Create;
+ fPixelSize := 4.0;
+ fFormat := tfABGR8;
+ fWithAlpha := tfABGR8;
+ fWithoutAlpha := tfBGR8;
+ fOpenGLFormat := tfABGR8;
+ fRGBInverted := tfARGB8;
+ fRange.r := $FF;
+ fRange.g := $FF;
+ fRange.b := $FF;
+ fRange.a := $FF;
+ fShift.r := 0;
+ fShift.g := 8;
+ fShift.b := 16;
+ fShift.a := 24;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGBA8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8_REV;
+end;
+
+constructor TfdBGR10A2.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfBGR10A2;
+ fWithAlpha := tfBGR10A2;
+ fWithoutAlpha := tfBGR10X2;
+ fOpenGLFormat := tfBGR10A2;
+ fRGBInverted := tfRGB10A2;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fRange.a := $0003;
+ fShift.r := 2;
+ fShift.g := 12;
+ fShift.b := 22;
+ fShift.a := 0;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_10_10_10_2;
+end;
+
+constructor TfdA2BGR10.Create;
+begin
+ inherited Create;
+ fPixelSize := 3.0;
+ fFormat := tfA2BGR10;
+ fWithAlpha := tfA2BGR10;
+ fWithoutAlpha := tfX2BGR10;
+ fOpenGLFormat := tfA2BGR10;
+ fRGBInverted := tfA2RGB10;
+ fRange.r := $03FF;
+ fRange.g := $03FF;
+ fRange.b := $03FF;
+ fRange.a := $0003;
+ fShift.r := 0;
+ fShift.g := 10;
+ fShift.b := 20;
+ fShift.a := 30;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_2_10_10_10_REV;
+end;
+
+constructor TfdBGRA16.Create;
+begin
+ inherited Create;
+ fPixelSize := 8.0;
+ fFormat := tfBGRA16;
+ fWithAlpha := tfBGRA16;
+ fWithoutAlpha := tfBGR16;
+ fOpenGLFormat := tfBGRA16;
+ fRGBInverted := tfRGBA16;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fRange.a := $FFFF;
+ fShift.r := 16;
+ fShift.g := 32;
+ fShift.b := 48;
+ fShift.a := 0;
+ fglFormat := GL_RGBA; // reverse byte order to match little endianess
+ fglInternalFormat := GL_RGBA16; // as if u interpret the 3 bytes as unsigned integer
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;
+
+constructor TfdDepth16.Create;
+begin
+ inherited Create;
+ fPixelSize := 2.0;
+ fFormat := tfDepth16;
+ fWithoutAlpha := tfDepth16;
+ fOpenGLFormat := tfDepth16;
+ fRange.r := $FFFF;
+ fRange.g := $FFFF;
+ fRange.b := $FFFF;
+ fRange.a := $FFFF;
+ fglFormat := GL_DEPTH_COMPONENT;
+ fglInternalFormat := GL_DEPTH_COMPONENT16;
+ fglDataFormat := GL_UNSIGNED_SHORT;
+end;