X-Git-Url: https://git.delphigl.com/?p=LazOpenGLCore.git;a=blobdiff_plain;f=doc%2FglBitmap.TglBitmap2D.html;fp=doc%2FglBitmap.TglBitmap2D.html;h=ce0232a355fe13199a072b763777699e77fccbe0;hp=0000000000000000000000000000000000000000;hb=1f9d3b8b9ce7d5e05f7af88c7ab0fd094609d9e5;hpb=5a2eeb45d528c5a2406b2ae5d73a4c711b2ea7dc diff --git a/doc/glBitmap.TglBitmap2D.html b/doc/glBitmap.TglBitmap2D.html new file mode 100644 index 0000000..ce0232a --- /dev/null +++ b/doc/glBitmap.TglBitmap2D.html @@ -0,0 +1,279 @@ + + + +glBitmap: Class TglBitmap2D + + + + + +
+

Class TglBitmap2D

+ + +
DescriptionHierarchyFieldsMethodsProperties
+

Unit

+ +

Declaration

+

+type TglBitmap2D = class(TglBitmap)

+

Description

+

+wrapper class for 2-dimensional textures (OpenGL target = GL_TEXTURE_2D)

+

Hierarchy

+

Overview

+

Fields

+ + + + + +
ProtectedfLines: array of PByte;
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Protectedfunction GetScanline(const aIndex: Integer): Pointer;
Protectedprocedure SetDataPointer(var aData: PByte; const aFormat: TglBitmapFormat; const aWidth: Integer = - 1; const aHeight: Integer = - 1); override;
Protectedprocedure UploadData(const aTarget: GLenum);
Publicprocedure AfterConstruction; override;
Publicprocedure GrabScreen(const aTop, aLeft, aRight, aBottom: Integer; const aFormat: TglBitmapFormat);
Publicprocedure GenTexture(const aTestTextureSize: Boolean = true); override;
Publicfunction FlipHorz: Boolean; override;
Publicfunction FlipVert: Boolean; override;
Publicprocedure GenerateNormalMap(const aFunc: TglBitmapNormalMapFunc = nm3x3; const aScale: Single = 2; const aUseAlpha: Boolean = false);
+

Properties

+ + + + + + + + + + + + + +
Publicproperty Width;
Publicproperty Height;
Publicproperty Scanline[constaIndex:Integer]: Pointer read GetScanline;
+

Description

+

Fields

+ + + + + + +
ProtectedfLines: array of PByte;
+

+array to store scanline entry points in

+
+

Methods

+ + + + + + +
Protectedfunction GetScanline(const aIndex: Integer): Pointer;
+

+get a specific scanline

+
Parameters
+
+
aIndex
+
index of the scanline to return
+
+
Returns
+

scanline at position aIndex or Nil

+ + + + + + +
Protectedprocedure SetDataPointer(var aData: PByte; const aFormat: TglBitmapFormat; const aWidth: Integer = - 1; const aHeight: Integer = - 1); override;
+

+set data pointer of texture data

+
Parameters
+
+
aData
+
pointer to new texture data (be carefull, aData could be freed by this function)
+
aFormat
+
format of the data stored at aData
+
aWidth
+
width of the texture data
+
aHeight
+
height of the texture data
+
+
+ + + + + + +
Protectedprocedure UploadData(const aTarget: GLenum);
+

+upload the texture data to video card

+
Parameters
+
+
aTarget
+
target o upload data to (e.g. GL_TEXTURE_2D)
+
aBuildWithGlu
+
use glu functions to build mipmaps
+
+
+ + + + + + +
Publicprocedure AfterConstruction; override;
+

+this method is called after constructor and initializes the object

+
+ + + + + + +
Publicprocedure GrabScreen(const aTop, aLeft, aRight, aBottom: Integer; const aFormat: TglBitmapFormat);
+

+copy a part of the frame buffer top the texture

+
Parameters
+
+
aTop
+
topmost pixel to copy
+
aLeft
+
leftmost pixel to copy
+
aRight
+
rightmost pixel to copy
+
aBottom
+
bottommost pixel to copy
+
aFormat
+
format to store data in
+
+
+ + + + + + +
Publicprocedure GenTexture(const aTestTextureSize: Boolean = true); override;
+

+generate texture (create texture object if not exist, set texture parameters and upload data)

+
Parameters
+
+
aTestTextureSize
+
check the size of the texture and throw exception if something is wrong
+
+
+ + + + + + +
Publicfunction FlipHorz: Boolean; override;
+

+flip texture horizontally

+
Returns
+

True on success, False otherwise

+ + + + + + +
Publicfunction FlipVert: Boolean; override;
+

+flip texture vertically

+
Returns
+

True on success, False otherwise

+ + + + + + +
Publicprocedure GenerateNormalMap(const aFunc: TglBitmapNormalMapFunc = nm3x3; const aScale: Single = 2; const aUseAlpha: Boolean = false);
+

+create normal map from texture data

+
Parameters
+
+
aFunc
+
normal map function to generate normalmap with
+
aScale
+
scale of the normale stored in the normal map
+
aUseAlpha
+
generate normalmap from alpha channel data (if present)
+
+
+

Properties

+ + + + + + +
Publicproperty Width;
+

+actual width of the texture

+
+ + + + + + +
Publicproperty Height;
+

+actual height of the texture

+
+ + + + + + +
Publicproperty Scanline[constaIndex:Integer]: Pointer read GetScanline;
+

+scanline to access texture data directly

+
+
Generated by PasDoc 0.13.0 on 2014-12-21 15:05:48 + +