* removed some compiler defines
[glBitmap.git] / readme.txt
1 glBitmap by Steffen Xonna aka Lossy eX (2003-2008)
2 http://www.opengl24.de/index.php?cat=header&file=glbitmap
3
4 modified by Delphi OpenGL Community (http://delphigl.com/) (2013)
5
6 ------------------------------------------------------------
7 The contents of this project are used with permission, subject to
8 the Mozilla Public License Version 1.1 (the "License"); you may
9 not use this file except in compliance with the License. You may
10 obtain a copy of the License at
11 http://www.mozilla.org/MPL/MPL-1.1.html
12 ------------------------------------------------------------
13 The glBitmap is a Delphi/FPC unit that contains several wrapper classes
14 to manage OpenGL texture objects. Below you can find a list of the main
15 functionality of this classes:
16 - load texture data from file (e.g. BMP, TGA, DDS, PNG, JPEG, ...)
17 - load texture data from several other image objects (e.g. TBitmap, TLazIntfImage, SDL Surface)
18 - save texture data to file (e.g. BMP, TGA, DDS, PNG, JPEG, ...)
19 - save texture data to several other image objects (e.g. TBitmap, TLazIntfImage, SDL Surface)
20 - support for many texture formats (e.g. RGB8, BGR8, RGBA8, BGRA8, ...)
21 - manage texture properties (e.g. Filter, Clamp, Mipmap, ...)
22 - upload texture data to video card
23 - download texture data from video card
24 - manipulate texture data (e.g. add alpha, remove alpha, convert to other format, switch RGB, ...)
25
26 check glBitmapConf.default.inc to configure the glBitmap.pas to fit your needs
27 ------------------------------------------------------------
28 History
29 20-11-2013
30 - refactoring of the complete library
31 - glBitmap is managed by git, so this history is not maintenanced any longer
32 21-03-2010
33 - The define GLB_DELPHI dosn't check versions anymore. If you say you are using delphi
34   then it's your problem if that isn't true. This prevents the unit for incompatibility
35   with newer versions of Delphi.
36 - Problems with D2009+ resolved (Thanks noeska and all i forgot)
37 - GetPixel isn't set if you are loading textures inside the constructor (Thanks Wilson)
38 10-08-2008
39 - AddAlphaFromglBitmap used the custom pointer instead the imagedatapointer (Thanks Wilson)
40 - Additional Datapointer for functioninterface now has the name CustomData
41 24-07-2008
42 - AssigneAlphaToBitmap overwrites his own palette (Thanks Wilson)
43 - If you load an texture from an file the property Filename will be set to the name of the file
44 - Three new properties to attach custom data to the Texture objects
45   - CustomName  (free for use string)
46   - CustomNameW (free for use widestring)
47   - CustomDataPointer (free for use pointer to attach other objects or complex structures)
48 27-05-2008
49 - RLE TGAs loaded much faster
50 26-05-2008
51 - fixed some problem with reading RLE TGAs.
52 21-05-2008
53 - function clone now only copys data if it's assigned and now it also copies the ID
54 - it seems that lazarus dont like comments in comments.
55 01-05-2008
56 - It's possible to set the id of the texture
57 - define GLB_NO_NATIVE_GL deactivated by default
58 27-04-2008
59 - Now supports the following libraries
60   - SDL and SDL_image
61   - libPNG
62   - libJPEG
63 - Linux compatibillity via free pascal compatibility (delphi sources optional)
64 - BMPs now loaded manuel
65 - Large restructuring
66 - Property DataPtr now has the name Data
67 - Functions are more flexible between RGB(A) and BGR(A). RGB can be saved as Bitmap and will be saved as BGR
68 - Unused Depth removed
69 - Function FreeData to freeing image data added
70 24-10-2007
71 - ImageID flag of TGAs was ignored. (Thanks Zwoetzen)
72 15-11-2006
73 - Function SetBorderColor implemented (only used by opengl if wrap is set to GL_CLAMP_TO_BORDER)
74 - Function AddAlphaFromValue implemented to use an fixed Value as Alphachannel
75 - Function ReadOpenGLExtension is now only intern
76 29-06-2006
77 - pngimage now disabled by default like all other versions.
78 26-06-2006
79 - Setting up an anisotropic filter of 0 isnt allowed by nvidia (Thanks Ogridi)
80 22-06-2006
81 - Fixed some Problem with Delphi 5
82 - Now uses the newest version of pngimage. Makes saving pngs much easier.
83 22-03-2006
84 - Property IsCompressed and Size removed. Not really supported by Spec (Thanks Ogridi)
85 09-03-2006
86 - Internal Format ifDepth8 added
87 - function GrabScreen now supports all uncompressed formats
88 31-01-2006
89 - AddAlphaFromglBitmap implemented
90 29-12-2005
91 - LoadFromResource and LoadFromResourceId now needs an Instance and an ResourceType (for ID)
92 28-12-2005
93 - Width, Height and Depth internal changed to TglBitmapPixelPosition.
94   property Width, Height, Depth are still existing and new property Dimension are avail
95 11-12-2005
96 - Added native OpenGL Support. Breaking the dglOpenGL "barrier".
97 19-10-2005
98 - Added function GrabScreen to class TglBitmap2D
99 18-10-2005
100 - Added support to Save images
101 - Added function Clone to Clone Instance
102 11-10-2005
103 - Functions now works with Cardinals for each channel. Up to 32 Bits per channel.
104   Usefull for Future
105 - Several speed optimizations
106 09-10-2005
107 - Internal structure change. Loading of TGA, PNG and DDS improved.
108   Data, format and size will now set directly with SetDataPtr.
109 - AddFunc now works with all Types of Images and Formats
110 - Some Funtions moved to Baseclass TglBitmap
111 06-10-2005
112 - Added Support to decompress DXT3 and DXT5 compressed Images.
113 - Added Mapping to convert data from one format into an other.
114 05-10-2005
115 - Added method ConvertTo in Class TglBitmap2D. Method allows to convert every
116   supported Input format (supported by GetPixel) into any uncompresed Format
117 - Added Support to decompress DXT1 compressed Images.
118 - SwapColors replaced by ConvertTo
119 04-10-2005
120 - Added Support for compressed DDSs
121 - Added new internal formats (DXT1, DXT3, DXT5)
122 29-09-2005
123 - Parameter Components renamed to InternalFormat
124 23-09-2005
125 - Some AllocMem replaced with GetMem (little speed change)
126 - better exception handling. Better protection from memory leaks.
127 22-09-2005
128 - Added support for Direct Draw Surfaces (.DDS) (uncompressed images only)
129 - Added new internal formats (RGB8, RGBA8, RGBA4, RGB5A1, RGB10A2, R5G6B5)
130 07-09-2005
131 - Added support for Grayscale textures
132 - Added internal formats (Alpha, Luminance, LuminanceAlpha, BGR8, BGRA8)
133 10-07-2005
134 - Added support for GL_VERSION_2_0
135 - Added support for GL_EXT_texture_filter_anisotropic
136 04-07-2005
137 - Function FillWithColor fills the Image with one Color
138 - Function LoadNormalMap added
139 30-06-2005
140 - ToNormalMap allows to Create an NormalMap from the Alphachannel
141 - ToNormalMap now supports Sobel (nmSobel) function.
142 29-06-2005
143 - support for RLE Compressed RGB TGAs added
144 28-06-2005
145 - Class TglBitmapNormalMap added to support Normalmap generation
146 - Added function ToNormalMap in class TglBitmap2D to genereate normal maps from textures.
147   3 Filters are supported. (4 Samples, 3x3 and 5x5)
148 16-06-2005
149 - Method LoadCubeMapClass removed
150 - LoadCubeMap returnvalue is now the Texture paramter. Such as LoadTextures
151 - virtual abstract method GenTexture in class TglBitmap now is protected
152 12-06-2005
153 - now support DescriptionFlag in LoadTga. Allows vertical flipped images to be loaded as normal
154 10-06-2005
155 - little enhancement for IsPowerOfTwo
156 - TglBitmap1D.GenTexture now tests NPOT Textures
157 06-06-2005
158 - some little name changes. All properties or function with Texture in name are
159   now without texture in name. We have allways texture so we dosn't name it.
160 03-06-2005
161 - GenTexture now tests if texture is NPOT and NPOT-Texture are supported or
162   TextureTarget is GL_TEXTURE_RECTANGLE. Else it raised an exception.
163 02-06-2005
164 - added support for GL_ARB_texture_rectangle, GL_EXT_texture_rectangle and GL_NV_texture_rectangle
165 25-04-2005
166 - Function Unbind added
167 - call of SetFilter or SetTextureWrap if TextureID exists results in setting properties to opengl texture.
168 21-04-2005
169 - class TglBitmapCubeMap added (allows to Create Cubemaps)
170 29-03-2005
171 - Added Support for PNG Images. (http://pngdelphi.sourceforge.net/)
172   To Enable png's use the define pngimage
173 22-03-2005
174 - New Functioninterface added
175 - Function GetPixel added
176 27-11-2004
177 - Property BuildMipMaps renamed to MipMap
178 21-11-2004
179 - property Name removed.
180 - BuildMipMaps is now a set of 3 values. None, GluBuildMipmaps and SGIS_generate_mipmap
181 22-05-2004
182 - property name added. Only used in glForms!
183 26-11-2003
184 - property FreeDataAfterGenTexture is now available as default (default = true)
185 - BuildMipmaps now implemented in TglBitmap1D (i've forgotten it)
186 - function MoveMemory replaced with function Move (little speed change)
187 - several calculations stored in variables (little speed change)
188 29-09-2003
189 - property BuildMipsMaps added (default = true)
190   if BuildMipMaps isn't set GenTextures uses glTexImage[12]D else it use gluBuild[12]dMipmaps
191 - property FreeDataAfterGenTexture added (default = true)
192   if FreeDataAfterGenTexture is set the texturedata were deleted after the texture was generated.
193 - parameter DisableOtherTextureUnits of Bind removed
194 - parameter FreeDataAfterGeneration of GenTextures removed
195 12-09-2003
196 - TglBitmap dosn't delete data if class was destroyed (fixed)
197 09-09-2003
198 - Bind now enables TextureUnits (by params)
199 - GenTextures can leave data (by param)
200 - LoadTextures now optimal
201 03-09-2003
202 - Performance optimization in AddFunc
203 - procedure Bind moved to subclasses
204 - Added new Class TglBitmap1D to support real OpenGL 1D Textures
205 19-08-2003
206 - Texturefilter and texturewrap now also as defaults
207   Minfilter = GL_LINEAR_MIPMAP_LINEAR
208   Magfilter = GL_LINEAR
209   Wrap(str) = GL_CLAMP_TO_EDGE
210 - Added new format tfCompressed to create a compressed texture.
211 - propertys IsCompressed, TextureSize and IsResident added
212   IsCompressed and TextureSize only contains data from level 0
213 18-08-2003
214 - Added function AddFunc to add PerPixelEffects to Image
215 - LoadFromFunc now based on AddFunc
216 - Invert now based on AddFunc
217 - SwapColors now based on AddFunc
218 16-08-2003
219 - Added function FlipHorz
220 15-08-2003
221 - Added function LaodFromFunc to create images with function
222 - Added function FlipVert
223 - Added internal format RGB(A) if GL_EXT_bgra or OpenGL 1.2 isn't supported
224 29-07-2003
225 - Added Alphafunctions to calculate alpha per function
226 - Added Alpha from ColorKey using alphafunctions
227 28-07-2003
228 - First full functionally Version of glBitmap
229 - Support for 24Bit and 32Bit TGA Pictures added
230 25-07-2003
231 - begin of programming