X-Git-Url: https://git.delphigl.com/?p=glBitmap.git;a=blobdiff_plain;f=doc%2FglBitmap.TglBitmap.html;h=cf098b36ef8fd75ff43556fac4621cb4786533a1;hp=7f53bf58cd1b5c693b6bc359cbb4e9a86c3b71eb;hb=c110c2d190cfdd632a622163d3edb7c9c90cf21a;hpb=1f9d3b8b9ce7d5e05f7af88c7ab0fd094609d9e5
diff --git a/doc/glBitmap.TglBitmap.html b/doc/glBitmap.TglBitmap.html
index 7f53bf5..cf098b3 100644
--- a/doc/glBitmap.TglBitmap.html
+++ b/doc/glBitmap.TglBitmap.html
@@ -21,7 +21,7 @@
type TglBitmap = class(TObject)
-base class for all glBitmap classes. used to manage OpenGL texture objects and to load, save and manipulate texture data
+base class for all glBitmap classes. used to manage OpenGL texture objects all operations on a bitmap object must be done from the render threadfAnisotropic: Integer;
fDeleteTextureOnFree: Boolean;
fFreeDataOnDestroy: Boolean;
fFreeDataAfterGenTexture: Boolean;
fData: PByte;
fBorderColor: array[0..3] of Single;
fDimension: TglBitmapSize;
fMipMap: TglBitmapMipMap;
fFilterMin: GLenum;
fFormat: TglBitmapFormat;
fFilterMag: GLenum;
fPixelSize: Integer;
fWrapS: GLenum;
fRowSize: Integer;
fWrapT: GLenum;
fFilterMin: GLenum;
fWrapR: GLenum;
fFilterMag: GLenum;
fAnisotropic: Integer;
fWrapS: GLenum;
fBorderColor: array[0..3] of Single;
fWrapT: GLenum;
fSwizzle: array[0..3] of GLenum;
fWrapR: GLenum;
fDimension: TglBitmapSize;
fSwizzle: array[0..3] of GLenum;
fMipMap: TglBitmapMipMap;
fFilename: String;
fCustomData: Pointer;
fCustomNameW: WideString;
fCustomData: Pointer;
- | function GetFormatDesc: TglBitmapFormatDescriptor; |
-|
function GetWidth: Integer; virtual; |
||
- | function GetHeight: Integer; virtual; |
-|
- | function GetFileWidth: Integer; virtual; |
+function GetHeight: Integer; virtual; |
- | function GetFileHeight: Integer; virtual; |
-|
procedure SetCustomData(const aValue: Pointer); |
||
- | procedure SetCustomName(const aValue: String); |
-|
- | procedure SetCustomNameW(const aValue: WideString); |
+procedure SetCustomName(const aValue: String); |
- | procedure SetFreeDataOnDestroy(const aValue: Boolean); |
+procedure SetCustomNameW(const aValue: WideString); |
@@ -164,14 +120,6 @@ base class for all glBitmap classes. used to manage OpenGL texture objects and t | ||
- | procedure SetFormat(const aValue: TglBitmapFormat); |
-|
- | procedure SetFreeDataAfterGenTexture(const aValue: Boolean); |
-|
procedure SetID(const aValue: Cardinal); |
||
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 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); |
||
- | 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; |
+procedure UploadData(const aDataObj: TglBitmapData; const aCheckSize: Boolean = true); virtual; |
- | constructor Create(const aInstance: Cardinal; const aResource: String; const aResType: PChar = nil); overload; |
+constructor Create; 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); |
+constructor Create(const aData: TglBitmapData); overload; |
property Height: Integer read GetHeight;
property FileWidth: Integer read GetFileWidth;
property FileHeight: Integer read GetFileHeight;
property ID: Cardinal read fID write SetID;
property ID: Cardinal read fID write SetID;
property Target: Cardinal read fTarget write SetTarget;
property Target: Cardinal read fTarget write SetTarget;
property Format: TglBitmapFormat read fFormat write SetFormat;
property DeleteTextureOnFree: Boolean read fDeleteTextureOnFree write SetDeleteTextureOnFree;
property FormatDesc: TglBitmapFormatDescriptor read GetFormatDesc;
property Filename: String read fFilename;
property CustomName: String read fCustomName write SetCustomName;
property CustomNameW: WideString read fCustomNameW write SetCustomNameW;
property CustomData: Pointer read fCustomData write SetCustomData;
property DeleteTextureOnFree: Boolean read fDeleteTextureOnFree write SetDeleteTextureOnFree;
property CustomName: String read fCustomName write SetCustomName;
property FreeDataOnDestroy: Boolean read fFreeDataOnDestroy write SetFreeDataOnDestroy;
property CustomNameW: WideString read fCustomNameW write SetCustomNameW;
property FreeDataAfterGenTexture: Boolean read fFreeDataAfterGenTexture write SetFreeDataAfterGenTexture;
property Dimension: TglBitmapSize read fDimension;
property Data: PByte read fData;
- | fAnisotropic: Integer; |
+fDeleteTextureOnFree: Boolean; |
-anisotropic level +delete OpenGL texture object when this object is destroyed |
- | fDeleteTextureOnFree: Boolean; |
+fFilterMin: GLenum; |
-delete OpenGL texture object when this object is destroyed +min filter to apply to the texture |
- | fFreeDataOnDestroy: Boolean; |
+fFilterMag: GLenum; |
-free stored data when this object is destroyed +mag filter to apply to the texture |
- | fFreeDataAfterGenTexture: Boolean; |
+fWrapS: GLenum; |
-free stored data after data was uploaded to video card +texture wrapping for x axis |
- | fData: PByte; |
+fWrapT: GLenum; |
-data of this texture +texture wrapping for y axis |
- | fBorderColor: array[0..3] of Single; |
+fWrapR: GLenum; |
-color of the texture border +texture wrapping for z axis |
- | fDimension: TglBitmapSize; |
+fAnisotropic: Integer; |
-size of this texture +anisotropic level |
- | fMipMap: TglBitmapMipMap; |
+fBorderColor: array[0..3] of Single; |
-mipmap type +color of the texture border |
- | fFormat: TglBitmapFormat; |
+fSwizzle: array[0..3] of GLenum; |
-format the texture data is stored in +color channel swizzle |
- | fPixelSize: Integer; |
+fDimension: TglBitmapSize; |
-size of one pixel (in byte) +size of this texture |
- | fRowSize: Integer; |
-
- -size of one pixel row (in byte) - |
- | fFilterMin: GLenum; |
-
- -min filter to apply to the texture - |
- | fFilterMag: GLenum; |
-
- -mag filter to apply to the texture - |
- | fWrapS: GLenum; |
-
- -texture wrapping for x axis - |
- | fWrapT: GLenum; |
-
- -texture wrapping for y axis - |
- | fWrapR: GLenum; |
-
- -texture wrapping for z axis - |
- | fSwizzle: array[0..3] of GLenum; |
+fMipMap: TglBitmapMipMap; |
-color channel swizzle +mipmap type |
- | fFilename: String; |
+fCustomData: Pointer; |
-filename the texture was load from +user defined data |
- | fCustomData: Pointer; |
-
- -user defined data - |
- | function GetFormatDesc: TglBitmapFormatDescriptor; |
-
- Returns-format descriptor that describes the format of the stored data |
function GetWidth: Integer; virtual; |
- | function GetFileWidth: Integer; virtual; |
-
- Returns-the width of the texture or 1 if the width is zero |
- | function GetFileHeight: Integer; virtual; |
-
- Returns-the height of the texture or 1 if the height is zero |
procedure SetCustomData(const aValue: Pointer); |
|
@@ -798,742 +433,102 @@ set a new value for fCustomName |
- | procedure SetCustomNameW(const aValue: WideString); |
-
- -set a new value for fCustomNameW - |
- | procedure SetFreeDataOnDestroy(const aValue: Boolean); |
-
- -set new value for fFreeDataOnDestroy - |
- | procedure SetDeleteTextureOnFree(const aValue: Boolean); |
-
- -set new value for fDeleteTextureOnFree - |
- | procedure SetFormat(const aValue: TglBitmapFormat); |
-
- -set new value for the data format. only possible if new format has the same pixel size. if you want to convert the texture data, see ConvertTo function - |
- | procedure SetFreeDataAfterGenTexture(const aValue: Boolean); |
-
- -set new value for fFreeDataAfterGenTexture - |
- | procedure SetID(const aValue: Cardinal); |
-
- -set name of OpenGL texture object - |
- | procedure SetMipMap(const aValue: TglBitmapMipMap); |
-
- -set new value for fMipMap - |
- | procedure SetTarget(const aValue: Cardinal); |
-
- -set new value for target - |
- | procedure SetAnisotropic(const aValue: Integer); |
-
- -set new value for fAnisotrophic - |
- | procedure CreateID; |
-
- -create OpenGL texture object (delete exisiting object if exists) - |
- | procedure SetupParameters(); |
-
- -setup texture parameters - |
- | procedure SetDataPointer(var aData: PByte; const aFormat: TglBitmapFormat; const aWidth: Integer = -1; const aHeight: Integer = -1); virtual; |
-
- -set data pointer of texture data -Parameters-
|
- | function FlipHorz: Boolean; virtual; |
-
- -flip texture horizontal -Returns-
|
- | function FlipVert: Boolean; virtual; |
-
- -flip texture vertical -Returns-
|
- | procedure AfterConstruction; override; |
-
- -this method is called after the constructor and sets the default values of this object - |
- | procedure BeforeDestruction; override; |
-
- -this method is called before the destructor and does some cleanup - |
- | procedure LoadFromFile(const aFilename: String); |
-
- -load a texture from a file -Parameters-
|
- | procedure LoadFromStream(const aStream: TStream); virtual; |
-
- -load a texture from a stream -Parameters-
|
- | procedure LoadFromFunc(const aSize: TglBitmapSize; const aFunc: TglBitmapFunction; const aFormat: TglBitmapFormat; const aArgs: Pointer = nil); |
-
- -use a function to generate texture data -Parameters-
|
- | procedure SaveToFile(const aFilename: String; const aFileType: TglBitmapFileType); |
-
- -save texture data to a file -Parameters-
|
- | procedure SaveToStream(const aStream: TStream; const aFileType: TglBitmapFileType); virtual; |
-
- -save texture data to a stream -Parameters-
|
- | function Convert(const aFunc: TglBitmapFunction; const aCreateTemp: Boolean; const aArgs: Pointer = nil): Boolean; overload; |
-
- -convert texture data using a user defined callback -Parameters-
Returns-
|
- | function Convert(const aSource: TglBitmap; const aFunc: TglBitmapFunction; aCreateTemp: Boolean; const aFormat: TglBitmapFormat; const aArgs: Pointer = nil): Boolean; overload; |
-
- -convert texture data using a user defined callback -Parameters-
Returns-
|
- | function ConvertTo(const aFormat: TglBitmapFormat): Boolean; virtual; |
-
- -convert texture data using a specific format -Parameters-
Returns-
|
- | function AddAlphaFromResource(const aInstance: Cardinal; aResource: String; aResType: PChar = nil; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
-
- -load alpha channel data from resource -Parameters-
Returns-
|
- | function AddAlphaFromResourceID(const aInstance: Cardinal; const aResourceID: Integer; const aResType: PChar; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
-
- -load alpha channel data from resource ID -Parameters-
Returns-
|
- | function AddAlphaFromFunc(const aFunc: TglBitmapFunction; const aArgs: Pointer = nil): Boolean; virtual; |
-
- -add alpha channel data from function -Parameters-
Returns-
|
- | function AddAlphaFromFile(const aFileName: String; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
-
- -add alpha channel data from file (macro for: new glBitmap, LoadFromFile, AddAlphaFromGlBitmap) -Parameters-
Returns-
|
- | function AddAlphaFromStream(const aStream: TStream; const aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
-
- -add alpha channel data from stream (macro for: new glBitmap, LoadFromStream, AddAlphaFromGlBitmap) -Parameters-
Returns-
|
- | function AddAlphaFromGlBitmap(const aBitmap: TglBitmap; aFunc: TglBitmapFunction = nil; const aArgs: Pointer = nil): Boolean; |
-
- -add alpha channel data from existing glBitmap object -Parameters-
Returns-
|
- | function RemoveAlpha: Boolean; virtual; |
++ | procedure SetMipMap(const aValue: TglBitmapMipMap); |
-remove alpha channel -Returns-
|
- | function Clone: TglBitmap; |
++ | procedure SetTarget(const aValue: Cardinal); |
-create a clone of the current object -Returns-clone of this object |
- | procedure FreeData; |
++ | procedure CreateID; |
-free texture stored data +create OpenGL texture object (delete exisiting object if exists) |
- | constructor Create; overload; |
-
- -constructor - created an empty texture - |
- | constructor Create(const aFileName: String); overload; |
-
- -constructor - creates a texture and load it from a file -Parameters-
|
- | constructor Create(const aStream: TStream); overload; |
-
- -constructor - creates a texture and load it from a stream -Parameters-
|
- | constructor Create(const aSize: TglBitmapSize; const aFormat: TglBitmapFormat; aData: PByte = nil); overload; |
+procedure UploadData(const aDataObj: TglBitmapData; const aCheckSize: Boolean = true); virtual; |
-constructor - creates a texture with the given size, format and data you can control this by setting DeleteTextureOnFree, FreeDataOnDestroy and FreeDataAfterGenTexture +upload texture data from given data object to video cardParameters
|
- | constructor Create(const aSize: TglBitmapSize; const aFormat: TglBitmapFormat; const aFunc: TglBitmapFunction; const aArgs: Pointer = nil); overload; |
-
- -constructor - creates a texture with the given size and format and uses the given callback to create the data -Parameters-
|
- | procedure SaveRAW(const aStream: TStream); |
-
- -save texture data as RAW image to stream -Parameters-
|
- | function LoadBMP(const aStream: TStream): Boolean; |
-
- -try to load a BMP from a stream -Parameters-
Returns-
|
- | procedure SaveBMP(const aStream: TStream); |
-
- -save texture data as BMP to stream -Parameters-
|
- | function LoadTGA(const aStream: TStream): Boolean; |
-
- -try to load a TGA from a stream -Parameters-
Returns-
|
- | procedure SaveTGA(const aStream: TStream); |
-
- -save texture data as TGA to stream -Parameters-
|
- | function LoadDDS(const aStream: TStream): Boolean; |
-
- -try to load a DDS from a stream -Parameters-
Returns-
|
- | procedure SaveDDS(const aStream: TStream); |
+constructor Create(const aData: TglBitmapData); overload; |
-save texture data as DDS to stream -Parameters-
|
- | property FileWidth: Integer read GetFileWidth; |
-
- -the width of the texture or 1 if the width is zero - |
- | property FileHeight: Integer read GetFileHeight; |
-
- -the height of the texture or 1 if the height is zero - |
- | property ID: Cardinal read fID write SetID; |
+property ID: Cardinal read fID write SetID; |
||||||||||||||||||||||||||||||||||||||||||
@@ -1919,7 +689,7 @@ name of the OpenGL texture object
|