-function TFormatDescriptor.GetRedMask: QWord;
-begin
- result := fRange.r shl fShift.r;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetGreenMask: QWord;
-begin
- result := fRange.g shl fShift.g;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetBlueMask: QWord;
-begin
- result := fRange.b shl fShift.b;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetAlphaMask: QWord;
-begin
- result := fRange.a shl fShift.a;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetIsCompressed: Boolean;
-begin
- result := fIsCompressed;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetHasRed: Boolean;
-begin
- result := (fRange.r > 0);
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetHasGreen: Boolean;
-begin
- result := (fRange.g > 0);
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetHasBlue: Boolean;
-begin
- result := (fRange.b > 0);
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetHasAlpha: Boolean;
-begin
- result := (fRange.a > 0);
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetHasColor: Boolean;
-begin
- result := HasRed or HasGreen or HasAlpha;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetIsGrayscale: Boolean;
-var
- r, g, b: QWord;
-begin
- r := RedMask;
- g := GreenMask;
- b := BlueMask;
- result := (r = g) and (g = b) and (r > 0);
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetRGBInverted: TglBitmapFormat;
-begin
- result := fRGBInverted;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetWithAlpha: TglBitmapFormat;
-begin
- result := fWithAlpha;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetWithoutAlpha: TglBitmapFormat;
-begin
- result := fWithoutAlpha;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetOpenGLFormat: TglBitmapFormat;
-begin
- result := fOpenGLFormat;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetUncompressed: TglBitmapFormat;
-begin
- result := fUncompressed;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetglFormat: GLenum;
-begin
- result := fglFormat;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetglInternalFormat: GLenum;
-begin
- result := fglInternalFormat;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetglDataFormat: GLenum;
-begin
- result := fglDataFormat;
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function TFormatDescriptor.GetComponents: Integer;
-var
- i: Integer;
-begin
- result := 0;
- for i := 0 to 3 do
- if (fRange.arr[i] > 0) then
- inc(result);
-end;
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////