+ fglInternalFormat := GL_R3_G3_B2;
+ fglDataFormat := GL_UNSIGNED_BYTE_3_3_2;
+{$ELSE}
+ fOpenGLFormat := tfR5G6B5us1;
+{$ENDIF}
+end;
+
+procedure TfdRGBX4us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfRGBX4us1;
+ fWithAlpha := tfRGBA4us1;
+ fWithoutAlpha := tfRGBX4us1;
+ fRGBInverted := tfBGRX4us1;
+ fPrecision := glBitmapRec4ub( 4, 4, 4, 0);
+ fShift := glBitmapRec4ub(12, 8, 4, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfRGBX4us1;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4;
+{$ELSE}
+ fOpenGLFormat := tfR5G6B5us1;
+{$ENDIF}
+end;
+
+procedure TfdXRGB4us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfXRGB4us1;
+ fWithAlpha := tfARGB4us1;
+ fWithoutAlpha := tfXRGB4us1;
+ fRGBInverted := tfXBGR4us1;
+ fPrecision := glBitmapRec4ub(4, 4, 4, 0);
+ fShift := glBitmapRec4ub(8, 4, 0, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfXRGB4us1;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4_REV;
+{$ELSE}
+ fOpenGLFormat := tfR5G6B5us1;
+{$ENDIF}
+end;
+
+procedure TfdR5G6B5us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfR5G6B5us1;
+ fWithAlpha := tfRGB5A1us1;
+ fWithoutAlpha := tfR5G6B5us1;
+ fRGBInverted := tfB5G6R5us1;
+ fPrecision := glBitmapRec4ub( 5, 6, 5, 0);
+ fShift := glBitmapRec4ub(11, 5, 0, 0);
+{$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_2_0)}
+ fOpenGLFormat := tfR5G6B5us1;
+ fglFormat := GL_RGB;
+ fglInternalFormat := GL_RGB565;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_6_5;
+{$ELSE}
+ fOpenGLFormat := tfRGB8ub3;
+{$IFEND}
+end;
+
+procedure TfdRGB5X1us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfRGB5X1us1;
+ fWithAlpha := tfRGB5A1us1;
+ fWithoutAlpha := tfRGB5X1us1;
+ fRGBInverted := tfBGR5X1us1;
+ fPrecision := glBitmapRec4ub( 5, 5, 5, 0);
+ fShift := glBitmapRec4ub(11, 6, 1, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfRGB5X1us1;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB5;
+ fglDataFormat := GL_UNSIGNED_SHORT_5_5_5_1;
+{$ELSE}
+ fOpenGLFormat := tfR5G6B5us1;
+{$ENDIF}
+end;
+
+procedure TfdX1RGB5us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfX1RGB5us1;
+ fWithAlpha := tfA1RGB5us1;
+ fWithoutAlpha := tfX1RGB5us1;
+ fRGBInverted := tfX1BGR5us1;
+ fPrecision := glBitmapRec4ub( 5, 5, 5, 0);
+ fShift := glBitmapRec4ub(10, 5, 0, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfX1RGB5us1;
+ 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;
+{$ELSE}
+ fOpenGLFormat := tfR5G6B5us1;
+{$ENDIF}
+end;
+
+procedure TfdRGB8ub3.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 24;
+ fFormat := tfRGB8ub3;
+ fWithAlpha := tfRGBA8ub4;
+ fWithoutAlpha := tfRGB8ub3;
+ fRGBInverted := tfBGR8ub3;
+ fPrecision := glBitmapRec4ub(8, 8, 8, 0);
+ fShift := glBitmapRec4ub(0, 8, 16, 0);
+ fOpenGLFormat := tfRGB8ub3;
+ fglFormat := GL_RGB;
+ fglInternalFormat := {$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_3_0)}GL_RGB8{$ELSE}GL_RGB{$IFEND};
+ fglDataFormat := GL_UNSIGNED_BYTE;
+end;
+
+procedure TfdRGBX8ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfRGBX8ui1;
+ fWithAlpha := tfRGBA8ui1;
+ fWithoutAlpha := tfRGBX8ui1;
+ fRGBInverted := tfBGRX8ui1;
+ fPrecision := glBitmapRec4ub( 8, 8, 8, 0);
+ fShift := glBitmapRec4ub(24, 16, 8, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfRGBX8ui1;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8;
+{$ELSE}
+ fOpenGLFormat := tfRGB8ub3;
+{$ENDIF}
+end;
+
+procedure TfdXRGB8ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfXRGB8ui1;
+ fWithAlpha := tfXRGB8ui1;
+ fWithoutAlpha := tfXRGB8ui1;
+ fOpenGLFormat := tfXRGB8ui1;
+ fRGBInverted := tfXBGR8ui1;
+ fPrecision := glBitmapRec4ub( 8, 8, 8, 0);
+ fShift := glBitmapRec4ub(16, 8, 0, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfXRGB8ui1;
+ 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;
+{$ELSE}
+ fOpenGLFormat := tfRGB8ub3;
+{$ENDIF}
+end;
+
+procedure TfdRGB10X2ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfRGB10X2ui1;
+ fWithAlpha := tfRGB10A2ui1;
+ fWithoutAlpha := tfRGB10X2ui1;
+ fRGBInverted := tfBGR10X2ui1;
+ fPrecision := glBitmapRec4ub(10, 10, 10, 0);
+ fShift := glBitmapRec4ub(22, 12, 2, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfRGB10X2ui1;
+ fglFormat := GL_RGBA; //GL_INVALID_OPERATION if not GL_BGRA or GL_RGBA
+ fglInternalFormat := GL_RGB10;
+ fglDataFormat := GL_UNSIGNED_INT_10_10_10_2;
+{$ELSE}
+ fOpenGLFormat := tfRGB16us3;
+{$ENDIF}
+end;
+
+procedure TfdX2RGB10ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfX2RGB10ui1;
+ fWithAlpha := tfA2RGB10ui1;
+ fWithoutAlpha := tfX2RGB10ui1;
+ fRGBInverted := tfX2BGR10ui1;
+ fPrecision := glBitmapRec4ub(10, 10, 10, 0);
+ fShift := glBitmapRec4ub(20, 10, 0, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfX2RGB10ui1;
+ 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;
+{$ELSE}
+ fOpenGLFormat := tfRGB16us3;
+{$ENDIF}
+end;
+
+procedure TfdRGB16us3.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 48;
+ fFormat := tfRGB16us3;
+ fWithAlpha := tfRGBA16us4;
+ fWithoutAlpha := tfRGB16us3;
+ fRGBInverted := tfBGR16us3;
+ fPrecision := glBitmapRec4ub(16, 16, 16, 0);
+ fShift := glBitmapRec4ub( 0, 16, 32, 0);
+{$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_3_0)}
+ fOpenGLFormat := tfRGB16us3;
+ fglFormat := GL_RGB;
+ fglInternalFormat := {$IFNDEF OPENGL_ES}GL_RGB16{$ELSE}GL_RGB16UI{$ENDIF};
+ fglDataFormat := GL_UNSIGNED_SHORT;
+{$ELSE}
+ fOpenGLFormat := tfRGB8ub3;
+{$IFEND}
+end;
+
+procedure TfdRGBA4us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfRGBA4us1;
+ fWithAlpha := tfRGBA4us1;
+ fWithoutAlpha := tfRGBX4us1;
+ fOpenGLFormat := tfRGBA4us1;
+ fRGBInverted := tfBGRA4us1;
+ fPrecision := glBitmapRec4ub( 4, 4, 4, 4);
+ fShift := glBitmapRec4ub(12, 8, 4, 0);
+ fglFormat := GL_RGBA;
+ fglInternalFormat := {$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_3_0)}GL_RGBA8{$ELSE}GL_RGBA{$IFEND};
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4;
+end;
+
+procedure TfdARGB4us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfARGB4us1;
+ fWithAlpha := tfARGB4us1;
+ fWithoutAlpha := tfXRGB4us1;
+ fRGBInverted := tfABGR4us1;
+ fPrecision := glBitmapRec4ub( 4, 4, 4, 4);
+ fShift := glBitmapRec4ub( 8, 4, 0, 12);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfARGB4us1;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGBA4;
+ fglDataFormat := GL_UNSIGNED_SHORT_4_4_4_4_REV;
+{$ELSE}
+ fOpenGLFormat := tfRGBA4us1;
+{$ENDIF}
+end;
+
+procedure TfdRGB5A1us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfRGB5A1us1;
+ fWithAlpha := tfRGB5A1us1;
+ fWithoutAlpha := tfRGB5X1us1;
+ fOpenGLFormat := tfRGB5A1us1;
+ fRGBInverted := tfBGR5A1us1;
+ fPrecision := glBitmapRec4ub( 5, 5, 5, 1);
+ fShift := glBitmapRec4ub(11, 6, 1, 0);
+ fglFormat := GL_RGBA;
+ fglInternalFormat := {$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_2_0)}GL_RGB5_A1{$ELSE}GL_RGBA{$IFEND};
+ fglDataFormat := GL_UNSIGNED_SHORT_5_5_5_1;
+end;
+
+procedure TfdA1RGB5us1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 16;
+ fFormat := tfA1RGB5us1;
+ fWithAlpha := tfA1RGB5us1;
+ fWithoutAlpha := tfX1RGB5us1;
+ fRGBInverted := tfA1BGR5us1;
+ fPrecision := glBitmapRec4ub( 5, 5, 5, 1);
+ fShift := glBitmapRec4ub(10, 5, 0, 15);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfA1RGB5us1;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB5_A1;
+ fglDataFormat := GL_UNSIGNED_SHORT_1_5_5_5_REV;
+{$ELSE}
+ fOpenGLFormat := tfRGB5A1us1;
+{$ENDIF}
+end;
+
+procedure TfdRGBA8ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfRGBA8ui1;
+ fWithAlpha := tfRGBA8ui1;
+ fWithoutAlpha := tfRGBX8ui1;
+ fRGBInverted := tfBGRA8ui1;
+ fPrecision := glBitmapRec4ub( 8, 8, 8, 8);
+ fShift := glBitmapRec4ub(24, 16, 8, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfRGBA8ui1;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGBA8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8;
+{$ELSE}
+ fOpenGLFormat := tfRGBA8ub4;
+{$ENDIF}
+end;
+
+procedure TfdARGB8ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfARGB8ui1;
+ fWithAlpha := tfARGB8ui1;
+ fWithoutAlpha := tfXRGB8ui1;
+ fRGBInverted := tfABGR8ui1;
+ fPrecision := glBitmapRec4ub( 8, 8, 8, 8);
+ fShift := glBitmapRec4ub(16, 8, 0, 24);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfARGB8ui1;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGBA8;
+ fglDataFormat := GL_UNSIGNED_INT_8_8_8_8_REV;
+{$ELSE}
+ fOpenGLFormat := tfRGBA8ub4;
+{$ENDIF}
+end;
+
+procedure TfdRGBA8ub4.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfRGBA8ub4;
+ fWithAlpha := tfRGBA8ub4;
+ fWithoutAlpha := tfRGB8ub3;
+ fOpenGLFormat := tfRGBA8ub4;
+ fRGBInverted := tfBGRA8ub4;
+ fPrecision := glBitmapRec4ub( 8, 8, 8, 8);
+ fShift := glBitmapRec4ub( 0, 8, 16, 24);
+ fglFormat := GL_RGBA;
+ fglInternalFormat := {$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_3_0)}GL_RGBA8{$ELSE}GL_RGBA{$IFEND};
+ fglDataFormat := GL_UNSIGNED_BYTE;
+end;
+
+procedure TfdRGB10A2ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfRGB10A2ui1;
+ fWithAlpha := tfRGB10A2ui1;
+ fWithoutAlpha := tfRGB10X2ui1;
+ fRGBInverted := tfBGR10A2ui1;
+ fPrecision := glBitmapRec4ub(10, 10, 10, 2);
+ fShift := glBitmapRec4ub(22, 12, 2, 0);
+{$IFNDEF OPENGL_ES}
+ fOpenGLFormat := tfRGB10A2ui1;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_10_10_10_2;
+{$ELSE}
+ fOpenGLFormat := tfA2RGB10ui1;
+{$ENDIF}
+end;
+
+procedure TfdA2RGB10ui1.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 32;
+ fFormat := tfA2RGB10ui1;
+ fWithAlpha := tfA2RGB10ui1;
+ fWithoutAlpha := tfX2RGB10ui1;
+ fRGBInverted := tfA2BGR10ui1;
+ fPrecision := glBitmapRec4ub(10, 10, 10, 2);
+ fShift := glBitmapRec4ub(20, 10, 0, 30);
+{$IF NOT DEFINED(OPENGL_ES)}
+ fOpenGLFormat := tfA2RGB10ui1;
+ fglFormat := GL_BGRA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_2_10_10_10_REV;
+{$ELSEIF DEFINED(OPENGL_ES_3_0)}
+ fOpenGLFormat := tfA2RGB10ui1;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := GL_RGB10_A2;
+ fglDataFormat := GL_UNSIGNED_INT_2_10_10_10_REV;
+{$ELSE}
+ fOpenGLFormat := tfRGBA8ui1;
+{$IFEND}
+end;
+
+procedure TfdRGBA16us4.SetValues;
+begin
+ inherited SetValues;
+ fBitsPerPixel := 64;
+ fFormat := tfRGBA16us4;
+ fWithAlpha := tfRGBA16us4;
+ fWithoutAlpha := tfRGB16us3;
+ fRGBInverted := tfBGRA16us4;
+ fPrecision := glBitmapRec4ub(16, 16, 16, 16);
+ fShift := glBitmapRec4ub( 0, 16, 32, 48);
+{$IF NOT DEFINED(OPENGL_ES) OR DEFINED(OPENGL_ES_3_0)}
+ fOpenGLFormat := tfRGBA16us4;
+ fglFormat := GL_RGBA;
+ fglInternalFormat := {$IFNDEF OPENGL_ES}GL_RGBA16{$ELSE}GL_RGBA16UI{$ENDIF};