{$OPTIMIZATION ON}
{$ENDIF}
-{$UNDEF GLB_LAZARUS}
-
interface
uses
{ @return @true if the format is a grayscale format, @false otherwise }
function GetIsGrayscale: Boolean;
+
+ { @return @true if the format is supported by OpenGL, @false otherwise }
+ function GetHasOpenGLSupport: Boolean;
+
protected
fFormat: TglBitmapFormat; //< format this descriptor belongs to
fWithAlpha: TglBitmapFormat; //< suitable format with alpha channel
property HasColor: Boolean read GetHasColor; //< @true if the format has any color color channel, @false otherwise
property IsGrayscale: Boolean read GetIsGrayscale; //< @true if the format is a grayscale format, @false otherwise
+ property HasOpenGLSupport: Boolean read GetHasOpenGLSupport; //< @true if the format is supported by OpenGL, @false otherwise
+
function GetSize(const aSize: TglBitmapSize): Integer; overload; virtual;
function GetSize(const aWidth, aHeight: Integer): Integer; overload; virtual;
result := (Mask.r = Mask.g) and (Mask.g = Mask.b) and (Mask.r > 0);
end;
+function TglBitmapFormatDescriptor.GetHasOpenGLSupport: Boolean;
+begin
+ result := (OpenGLFormat = Format);
+end;
+
procedure TglBitmapFormatDescriptor.SetValues;
begin
fFormat := tfEmpty;