base class for all glBitmap classes. used to manage OpenGL texture objects and to load, save and manipulate texture data
|
function GetFormatDesc: TglBitmapFormatDescriptor; |
|
function GetWidth: Integer; virtual; |
|
function GetHeight: Integer; virtual; |
|
function GetFileWidth: Integer; virtual; |
|
function GetFileHeight: Integer; virtual; |
|
procedure SetCustomData(const aValue: Pointer); |
|
procedure SetCustomName(const aValue: String); |
|
procedure SetCustomNameW(const aValue: WideString); |
|
procedure SetFreeDataOnDestroy(const aValue: Boolean); |
|
procedure SetDeleteTextureOnFree(const aValue: Boolean); |
|
procedure SetFormat(const aValue: TglBitmapFormat); |
|
procedure SetFreeDataAfterGenTexture(const aValue: Boolean); |
|
procedure SetID(const aValue: Cardinal); |
|
procedure SetMipMap(const aValue: TglBitmapMipMap); |
|
procedure SetTarget(const aValue: Cardinal); |
|
procedure SetAnisotropic(const aValue: Integer); |
|
procedure CreateID; |
|
procedure SetupParameters(); |
|
procedure SetDataPointer(var aData: PByte; const aFormat: TglBitmapFormat; const aWidth: Integer = -1; const aHeight: Integer = -1); virtual; |
|
procedure GenTexture(const aTestTextureSize: Boolean = true); virtual; abstract; |
|
function FlipHorz: Boolean; virtual; |
|
function FlipVert: Boolean; virtual; |
|
procedure AfterConstruction; override; |
|
procedure BeforeDestruction; override; |
|
procedure PrepareResType(var aResource: String; var aResType: PChar); |
|
procedure LoadFromFile(const aFilename: String); |
|
procedure LoadFromStream(const aStream: TStream); virtual; |
|
procedure LoadFromFunc(const aSize: TglBitmapSize; const aFunc: TglBitmapFunction; const aFormat: TglBitmapFormat; const aArgs: Pointer = nil); |
|
procedure LoadFromResource(const aInstance: Cardinal; aResource: String; aResType: PChar = nil); |
|
procedure LoadFromResourceID(const aInstance: Cardinal; const aResourceID: Integer; const aResType: PChar); |
|
procedure SaveToFile(const aFilename: String; const aFileType: TglBitmapFileType); |
|
procedure SaveToStream(const aStream: TStream; const aFileType: TglBitmapFileType); virtual; |
|
function Convert(const aFunc: TglBitmapFunction; const aCreateTemp: Boolean; const aArgs: Pointer = nil): Boolean; overload; |
|
function Convert(const aSource: TglBitmap; const aFunc: TglBitmapFunction; aCreateTemp: Boolean; const aFormat: TglBitmapFormat; const aArgs: Pointer = nil): Boolean; overload; |
|
function ConvertTo(const aFormat: TglBitmapFormat): Boolean; virtual; |
|
function AddAlphaFromResource(const aInstance: Cardinal; aResource: String; aResType: PChar = nil; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
|
function AddAlphaFromResourceID(const aInstance: Cardinal; const aResourceID: Integer; const aResType: PChar; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
|
function AddAlphaFromFunc(const aFunc: TglBitmapFunction; const aArgs: Pointer = nil): Boolean; virtual; |
|
function AddAlphaFromFile(const aFileName: String; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
|
function AddAlphaFromStream(const aStream: TStream; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
|
function AddAlphaFromGlBitmap(const aBitmap: TglBitmap; aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
|
function AddAlphaFromColorKey(const aRed, aGreen, aBlue: Byte; const aDeviation: Byte = 0): Boolean; |
|
function AddAlphaFromColorKeyRange(const aRed, aGreen, aBlue: Cardinal; const aDeviation: Cardinal = 0): Boolean; |
|
function AddAlphaFromColorKeyFloat(const aRed, aGreen, aBlue: Single; const aDeviation: Single = 0): Boolean; |
|
function AddAlphaFromValue(const aAlpha: Byte): Boolean; |
|
function AddAlphaFromValueRange(const aAlpha: Cardinal): Boolean; |
|
function AddAlphaFromValueFloat(const aAlpha: Single): Boolean; |
|
function RemoveAlpha: Boolean; virtual; |
|
function Clone: TglBitmap; |
|
procedure Invert(const aUseRGB: Boolean = true; const aUseAlpha: Boolean = false); |
|
procedure FreeData; |
|
procedure FillWithColor(const aRed, aGreen, aBlue: Byte; const aAlpha: Byte = 255); |
|
procedure FillWithColorRange(const aRed, aGreen, aBlue: Cardinal; const aAlpha: Cardinal = $FFFFFFFF); |
|
procedure FillWithColorFloat(const aRed, aGreen, aBlue: Single; const aAlpha: Single = 1.0); |
|
procedure SetFilter(const aMin, aMag: GLenum); |
|
procedure SetWrap( const S: GLenum = GL_CLAMP_TO_EDGE; const T: GLenum = GL_CLAMP_TO_EDGE; const R: GLenum = GL_CLAMP_TO_EDGE); |
|
procedure SetSwizzle(const r, g, b, a: GLenum); |
|
procedure Bind(const aEnableTextureUnit: Boolean = true); virtual; |
|
procedure Unbind(const aDisableTextureUnit: Boolean = true); virtual; |
|
constructor Create; overload; |
|
constructor Create(const aFileName: String); overload; |
|
constructor Create(const aStream: TStream); overload; |
|
constructor Create(const aSize: TglBitmapSize; const aFormat: TglBitmapFormat; aData: PByte = nil); overload; |
|
constructor Create(const aSize: TglBitmapSize; const aFormat: TglBitmapFormat; const aFunc: TglBitmapFunction; const aArgs: Pointer = nil); overload; |
|
constructor Create(const aInstance: Cardinal; const aResource: String; const aResType: PChar = nil); overload; |
|
constructor Create(const aInstance: Cardinal; const aResourceID: Integer; const aResType: PChar); overload; |
|
function LoadRAW(const aStream: TStream): Boolean; |
|
procedure SaveRAW(const aStream: TStream); |
|
function LoadBMP(const aStream: TStream): Boolean; |
|
procedure SaveBMP(const aStream: TStream); |
|
function LoadTGA(const aStream: TStream): Boolean; |
|
procedure SaveTGA(const aStream: TStream); |
|
function LoadDDS(const aStream: TStream): Boolean; |
|
procedure SaveDDS(const aStream: TStream); |