1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
4 <title>glBitmap: Class TglBitmap2D</title>
5 <meta name="generator" content="PasDoc 0.13.0">
6 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
7 <link rel="StyleSheet" type="text/css" href="pasdoc.css">
10 <table class="container"><tr><td class="navigation">
11 <p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
12 <a name="TglBitmap2D"></a><h1 class="cio">Class TglBitmap2D</h1>
13 <table class="sections wide_list">
15 <td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td><a class="section" href="#PasDoc-Fields">Fields</a></td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
16 <a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
18 <a href="glBitmap.html">glBitmap</a></p>
19 <h2 class="declaration">Declaration</h2>
20 <p class="declaration">
21 <code>type TglBitmap2D = class(<a class="normal" href="glBitmap.TglBitmap.html">TglBitmap</a>)</code></p>
22 <h2 class="description">Description</h2>
24 wrapper class for 2-dimensional textures (OpenGL target = GL_TEXTURE_2D)</p>
25 <a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
26 <ul class="hierarchy"><li class="ancestor">TObject</li>
27 <li class="ancestor"><a class="normal" href="glBitmap.TglBitmap.html">TglBitmap</a></li>
28 <li class="thisitem">TglBitmap2D</li></ul><h2 class="overview">Overview</h2>
29 <a name="PasDoc-Fields"></a><h3 class="summary">Fields</h3>
30 <table class="summary wide_list">
32 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
33 <td class="itemcode"><code><b><a href="glBitmap.TglBitmap2D.html#fLines">fLines</a></b>: array of PByte;</code></td>
36 <a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
37 <table class="summary wide_list">
39 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
40 <td class="itemcode"><code>function <b><a href="glBitmap.TglBitmap2D.html#GetScanline">GetScanline</a></b>(const aIndex: Integer): Pointer;</code></td>
43 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
44 <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#SetDataPointer">SetDataPointer</a></b>(var aData: PByte; const aFormat: <a href="glBitmap.html#TglBitmapFormat">TglBitmapFormat</a>; const aWidth: Integer = - 1; const aHeight: Integer = - 1); override;</code></td>
47 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
48 <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#UploadData">UploadData</a></b>(const aTarget: GLenum);</code></td>
51 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
52 <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#AfterConstruction">AfterConstruction</a></b>; override;</code></td>
55 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
56 <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#GrabScreen">GrabScreen</a></b>(const aTop, aLeft, aRight, aBottom: Integer; const aFormat: <a href="glBitmap.html#TglBitmapFormat">TglBitmapFormat</a>);</code></td>
59 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
60 <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#GenTexture">GenTexture</a></b>(const aTestTextureSize: Boolean = true); override;</code></td>
63 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
64 <td class="itemcode"><code>function <b><a href="glBitmap.TglBitmap2D.html#FlipHorz">FlipHorz</a></b>: Boolean; override;</code></td>
67 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
68 <td class="itemcode"><code>function <b><a href="glBitmap.TglBitmap2D.html#FlipVert">FlipVert</a></b>: Boolean; override;</code></td>
71 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
72 <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#GenerateNormalMap">GenerateNormalMap</a></b>(const aFunc: <a href="glBitmap.html#TglBitmapNormalMapFunc">TglBitmapNormalMapFunc</a> = nm3x3; const aScale: Single = 2; const aUseAlpha: Boolean = false);</code></td>
75 <a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
76 <table class="summary wide_list">
78 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
79 <td class="itemcode"><code>property <b><a href="glBitmap.TglBitmap2D.html#Width">Width</a></b>;</code></td>
82 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
83 <td class="itemcode"><code>property <b><a href="glBitmap.TglBitmap2D.html#Height">Height</a></b>;</code></td>
86 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
87 <td class="itemcode"><code>property <b><a href="glBitmap.TglBitmap2D.html#Scanline">Scanline</a></b>[constaIndex:Integer]: Pointer read <a href="glBitmap.TglBitmap2D.html#GetScanline">GetScanline</a>;</code></td>
90 <h2 class="description">Description</h2>
91 <h3 class="detail">Fields</h3>
92 <table class="detail wide_list">
94 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
95 <td class="itemcode"><a name="fLines"></a><code><b>fLines</b>: array of PByte;</code></td>
99 array to store scanline entry points in</p>
102 <h3 class="detail">Methods</h3>
103 <table class="detail wide_list">
105 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
106 <td class="itemcode"><a name="GetScanline"></a><code>function <b>GetScanline</b>(const aIndex: Integer): Pointer;</code></td>
110 get a specific scanline </p>
111 <h6 class="description_section">Parameters</h6>
112 <dl class="parameters">
114 <dd>index of the scanline to return</dd>
116 <h6 class="description_section">Returns</h6>
117 <p class="return">scanline at position aIndex or <code>Nil</code></p></td></tr>
119 <table class="detail wide_list">
121 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
122 <td class="itemcode"><a name="SetDataPointer"></a><code>procedure <b>SetDataPointer</b>(var aData: PByte; const aFormat: <a href="glBitmap.html#TglBitmapFormat">TglBitmapFormat</a>; const aWidth: Integer = - 1; const aHeight: Integer = - 1); override;</code></td>
126 set data pointer of texture data </p>
127 <h6 class="description_section">Parameters</h6>
128 <dl class="parameters">
130 <dd>pointer to new texture data (be carefull, aData could be freed by this function)</dd>
132 <dd>format of the data stored at aData</dd>
134 <dd>width of the texture data</dd>
136 <dd>height of the texture data</dd>
140 <table class="detail wide_list">
142 <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
143 <td class="itemcode"><a name="UploadData"></a><code>procedure <b>UploadData</b>(const aTarget: GLenum);</code></td>
147 upload the texture data to video card </p>
148 <h6 class="description_section">Parameters</h6>
149 <dl class="parameters">
151 <dd>target o upload data to (e.g. GL_TEXTURE_2D)</dd>
152 <dt>aBuildWithGlu</dt>
153 <dd>use glu functions to build mipmaps</dd>
157 <table class="detail wide_list">
159 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
160 <td class="itemcode"><a name="AfterConstruction"></a><code>procedure <b>AfterConstruction</b>; override;</code></td>
164 this method is called after constructor and initializes the object</p>
167 <table class="detail wide_list">
169 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
170 <td class="itemcode"><a name="GrabScreen"></a><code>procedure <b>GrabScreen</b>(const aTop, aLeft, aRight, aBottom: Integer; const aFormat: <a href="glBitmap.html#TglBitmapFormat">TglBitmapFormat</a>);</code></td>
174 copy a part of the frame buffer top the texture </p>
175 <h6 class="description_section">Parameters</h6>
176 <dl class="parameters">
178 <dd>topmost pixel to copy</dd>
180 <dd>leftmost pixel to copy</dd>
182 <dd>rightmost pixel to copy</dd>
184 <dd>bottommost pixel to copy</dd>
186 <dd>format to store data in</dd>
190 <table class="detail wide_list">
192 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
193 <td class="itemcode"><a name="GenTexture"></a><code>procedure <b>GenTexture</b>(const aTestTextureSize: Boolean = true); override;</code></td>
197 generate texture (create texture object if not exist, set texture parameters and upload data) </p>
198 <h6 class="description_section">Parameters</h6>
199 <dl class="parameters">
200 <dt>aTestTextureSize</dt>
201 <dd>check the size of the texture and throw exception if something is wrong</dd>
205 <table class="detail wide_list">
207 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
208 <td class="itemcode"><a name="FlipHorz"></a><code>function <b>FlipHorz</b>: Boolean; override;</code></td>
212 flip texture horizontally </p>
213 <h6 class="description_section">Returns</h6>
214 <p class="return"><code>True</code> on success, <code>False</code> otherwise</p></td></tr>
216 <table class="detail wide_list">
218 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
219 <td class="itemcode"><a name="FlipVert"></a><code>function <b>FlipVert</b>: Boolean; override;</code></td>
223 flip texture vertically </p>
224 <h6 class="description_section">Returns</h6>
225 <p class="return"><code>True</code> on success, <code>False</code> otherwise</p></td></tr>
227 <table class="detail wide_list">
229 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
230 <td class="itemcode"><a name="GenerateNormalMap"></a><code>procedure <b>GenerateNormalMap</b>(const aFunc: <a href="glBitmap.html#TglBitmapNormalMapFunc">TglBitmapNormalMapFunc</a> = nm3x3; const aScale: Single = 2; const aUseAlpha: Boolean = false);</code></td>
234 create normal map from texture data </p>
235 <h6 class="description_section">Parameters</h6>
236 <dl class="parameters">
238 <dd>normal map function to generate normalmap with</dd>
240 <dd>scale of the normale stored in the normal map</dd>
242 <dd>generate normalmap from alpha channel data (if present)</dd>
246 <h3 class="detail">Properties</h3>
247 <table class="detail wide_list">
249 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
250 <td class="itemcode"><a name="Width"></a><code>property <b>Width</b>;</code></td>
254 actual width of the texture</p>
257 <table class="detail wide_list">
259 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
260 <td class="itemcode"><a name="Height"></a><code>property <b>Height</b>;</code></td>
264 actual height of the texture</p>
267 <table class="detail wide_list">
269 <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
270 <td class="itemcode"><a name="Scanline"></a><code>property <b>Scanline</b>[constaIndex:Integer]: Pointer read <a href="glBitmap.TglBitmap2D.html#GetScanline">GetScanline</a>;</code></td>
274 scanline to access texture data directly</p>
277 <hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2014-12-21 15:05:48</em>
279 </td></tr></table></body></html>