|
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
- <html>
- <head>
- <title>glBitmap: Class TglBitmap2D</title>
- <meta name="generator" content="PasDoc 0.13.0">
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <link rel="StyleSheet" type="text/css" href="pasdoc.css">
- </head>
- <body>
- <table class="container"><tr><td class="navigation">
- <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">
- <a name="TglBitmap2D"></a><h1 class="cio">Class TglBitmap2D</h1>
- <table class="sections wide_list">
- <tr>
- <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>
- <a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
- <p class="unitlink">
- <a href="glBitmap.html">glBitmap</a></p>
- <h2 class="declaration">Declaration</h2>
- <p class="declaration">
- <code>type TglBitmap2D = class(<a class="normal" href="glBitmap.TglBitmap.html">TglBitmap</a>)</code></p>
- <h2 class="description">Description</h2>
- <p>
- wrapper class for 2-dimensional textures (OpenGL target = GL_TEXTURE_2D)</p>
- <a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
- <ul class="hierarchy"><li class="ancestor">TObject</li>
- <li class="ancestor"><a class="normal" href="glBitmap.TglBitmap.html">TglBitmap</a></li>
- <li class="thisitem">TglBitmap2D</li></ul><h2 class="overview">Overview</h2>
- <a name="PasDoc-Fields"></a><h3 class="summary">Fields</h3>
- <table class="summary wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <td class="itemcode"><code><b><a href="glBitmap.TglBitmap2D.html#fLines">fLines</a></b>: array of PByte;</code></td>
- </tr>
- </table>
- <a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
- <table class="summary wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <td class="itemcode"><code>function <b><a href="glBitmap.TglBitmap2D.html#GetScanline">GetScanline</a></b>(const aIndex: Integer): Pointer;</code></td>
- </tr>
- <tr class="list2">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <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>
- </tr>
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#UploadData">UploadData</a></b>(const aTarget: GLenum);</code></td>
- </tr>
- <tr class="list2">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#AfterConstruction">AfterConstruction</a></b>; override;</code></td>
- </tr>
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <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>
- </tr>
- <tr class="list2">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><code>procedure <b><a href="glBitmap.TglBitmap2D.html#GenTexture">GenTexture</a></b>(const aTestTextureSize: Boolean = true); override;</code></td>
- </tr>
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><code>function <b><a href="glBitmap.TglBitmap2D.html#FlipHorz">FlipHorz</a></b>: Boolean; override;</code></td>
- </tr>
- <tr class="list2">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><code>function <b><a href="glBitmap.TglBitmap2D.html#FlipVert">FlipVert</a></b>: Boolean; override;</code></td>
- </tr>
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <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>
- </tr>
- </table>
- <a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
- <table class="summary wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><code>property <b><a href="glBitmap.TglBitmap2D.html#Width">Width</a></b>;</code></td>
- </tr>
- <tr class="list2">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><code>property <b><a href="glBitmap.TglBitmap2D.html#Height">Height</a></b>;</code></td>
- </tr>
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <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>
- </tr>
- </table>
- <h2 class="description">Description</h2>
- <h3 class="detail">Fields</h3>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <td class="itemcode"><a name="fLines"></a><code><b>fLines</b>: array of PByte;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- array to store scanline entry points in</p>
- </td></tr>
- </table>
- <h3 class="detail">Methods</h3>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <td class="itemcode"><a name="GetScanline"></a><code>function <b>GetScanline</b>(const aIndex: Integer): Pointer;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- get a specific scanline </p>
- <h6 class="description_section">Parameters</h6>
- <dl class="parameters">
- <dt>aIndex</dt>
- <dd>index of the scanline to return</dd>
- </dl>
- <h6 class="description_section">Returns</h6>
- <p class="return">scanline at position aIndex or <code>Nil</code></p></td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <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>
- </tr>
- <tr><td colspan="2">
- <p>
- set data pointer of texture data </p>
- <h6 class="description_section">Parameters</h6>
- <dl class="parameters">
- <dt>aData</dt>
- <dd>pointer to new texture data (be carefull, aData could be freed by this function)</dd>
- <dt>aFormat</dt>
- <dd>format of the data stored at aData</dd>
- <dt>aWidth</dt>
- <dd>width of the texture data</dd>
- <dt>aHeight</dt>
- <dd>height of the texture data</dd>
- </dl>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
- <td class="itemcode"><a name="UploadData"></a><code>procedure <b>UploadData</b>(const aTarget: GLenum);</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- upload the texture data to video card </p>
- <h6 class="description_section">Parameters</h6>
- <dl class="parameters">
- <dt>aTarget</dt>
- <dd>target o upload data to (e.g. GL_TEXTURE_2D)</dd>
- <dt>aBuildWithGlu</dt>
- <dd>use glu functions to build mipmaps</dd>
- </dl>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><a name="AfterConstruction"></a><code>procedure <b>AfterConstruction</b>; override;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- this method is called after constructor and initializes the object</p>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <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>
- </tr>
- <tr><td colspan="2">
- <p>
- copy a part of the frame buffer top the texture </p>
- <h6 class="description_section">Parameters</h6>
- <dl class="parameters">
- <dt>aTop</dt>
- <dd>topmost pixel to copy</dd>
- <dt>aLeft</dt>
- <dd>leftmost pixel to copy</dd>
- <dt>aRight</dt>
- <dd>rightmost pixel to copy</dd>
- <dt>aBottom</dt>
- <dd>bottommost pixel to copy</dd>
- <dt>aFormat</dt>
- <dd>format to store data in</dd>
- </dl>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><a name="GenTexture"></a><code>procedure <b>GenTexture</b>(const aTestTextureSize: Boolean = true); override;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- generate texture (create texture object if not exist, set texture parameters and upload data) </p>
- <h6 class="description_section">Parameters</h6>
- <dl class="parameters">
- <dt>aTestTextureSize</dt>
- <dd>check the size of the texture and throw exception if something is wrong</dd>
- </dl>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><a name="FlipHorz"></a><code>function <b>FlipHorz</b>: Boolean; override;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- flip texture horizontally </p>
- <h6 class="description_section">Returns</h6>
- <p class="return"><code>True</code> on success, <code>False</code> otherwise</p></td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><a name="FlipVert"></a><code>function <b>FlipVert</b>: Boolean; override;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- flip texture vertically </p>
- <h6 class="description_section">Returns</h6>
- <p class="return"><code>True</code> on success, <code>False</code> otherwise</p></td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <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>
- </tr>
- <tr><td colspan="2">
- <p>
- create normal map from texture data </p>
- <h6 class="description_section">Parameters</h6>
- <dl class="parameters">
- <dt>aFunc</dt>
- <dd>normal map function to generate normalmap with</dd>
- <dt>aScale</dt>
- <dd>scale of the normale stored in the normal map</dd>
- <dt>aUseAlpha</dt>
- <dd>generate normalmap from alpha channel data (if present)</dd>
- </dl>
- </td></tr>
- </table>
- <h3 class="detail">Properties</h3>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><a name="Width"></a><code>property <b>Width</b>;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- actual width of the texture</p>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <td class="itemcode"><a name="Height"></a><code>property <b>Height</b>;</code></td>
- </tr>
- <tr><td colspan="2">
- <p>
- actual height of the texture</p>
- </td></tr>
- </table>
- <table class="detail wide_list">
- <tr class="list">
- <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
- <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>
- </tr>
- <tr><td colspan="2">
- <p>
- scanline to access texture data directly</p>
- </td></tr>
- </table>
- <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>
- </span>
- </td></tr></table></body></html>
|