~ubuntu-branches/ubuntu/utopic/castle-game-engine/utopic

« back to all changes in this revision

Viewing changes to doc/pasdoc/html/CastleTextureImages.html

  • Committer: Package Import Robot
  • Author(s): Abou Al Montacir
  • Date: 2013-04-27 18:06:40 UTC
  • Revision ID: package-import@ubuntu.com-20130427180640-eink4nmwzuivez1c
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
 
2
<html>
 
3
<head>
 
4
<title>Castle Game Engine: CastleTextureImages</title>
 
5
<meta name="generator" content="PasDoc 0.12.1">
 
6
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
 
7
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
 
8
</head>
 
9
<body>
 
10
<table class="container"><tr><td class="navigation">
 
11
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><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
<h1 class="unit">Unit CastleTextureImages</h1>
 
13
<table class="sections wide_list">
 
14
<tr>
 
15
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Uses">Uses</a></td><td><a class="section" href="#PasDoc-Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></td><td>Types</td><td><a class="section" href="#PasDoc-Constants">Constants</a></td><td>Variables</td></tr></table>
 
16
<a name="PasDoc-Description"></a><h2 class="description">Description</h2>
 
17
<p>
 
18
Handling of images for textures. This unit is not OpenGL-specific, it should be suitable for all 3D libraries. See GLImage for OpenGL-specific handling of textures and other images.
 
19
 
 
20
<p>Texture is any <a class="normal" href="CastleImages.TEncodedImage.html">TEncodedImage</a> instance. This includes not only a traditional 2D/3D matrix of pixels represented as <a class="normal" href="CastleImages.TCastleImage.html">TCastleImage</a>, but also a compressed texture, <a class="normal" href="CastleImages.TS3TCImage.html">TS3TCImage</a>. Moreover, a texture may have mipmaps defined &mdash; they are stored inside <a class="normal" href="CastleDDS.TDDSImage.html">TDDSImage</a> instance (that contains a list of <a class="normal" href="CastleImages.TEncodedImage.html">TEncodedImage</a>).
 
21
 
 
22
<p>Since not everything can really deal with such flexible definition of a texture, we decided to separate some routines specifically for textures. For example, you have <a class="normal" href="CastleTextureImages.html#LoadTextureImage">LoadTextureImage</a> to load full texture information &mdash; contrast this with <a class="normal" href="CastleImages.html#LoadImage">LoadImage</a> routine in Images unit, that only returns <a class="normal" href="CastleImages.TCastleImage.html">TCastleImage</a> (a &quot;normal&quot; way to deal with image data).</p>
 
23
<a name="PasDoc-Uses"></a><h2 class="uses">Uses</h2>
 
24
<ul class="useslist"><li><a  href="CastleImages.html">CastleImages</a></li><li><a  href="CastleDDS.html">CastleDDS</a></li><li><a  href="CastleUtils.html">CastleUtils</a></li><li>FGL</li><li><a  href="CastleVideos.html">CastleVideos</a></li></ul><h2 class="overview">Overview</h2>
 
25
<a name="PasDoc-Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
 
26
<table class="classestable wide_list">
 
27
<tr class="listheader">
 
28
<th class="itemname">Name</th>
 
29
<th class="itemdesc">Description</th>
 
30
</tr>
 
31
<tr class="list">
 
32
<td class="itemname">Class&nbsp;<a class="bold" href="CastleTextureImages.TTexturesVideosCache.html"><code>TTexturesVideosCache</code></a></td>
 
33
<td class="itemdesc">A cache of loaded images for textures.</td>
 
34
</tr>
 
35
</table>
 
36
<a name="PasDoc-FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
 
37
<table class="summary wide_list">
 
38
<tr class="list">
 
39
<td class="itemcode"><code>function <b><a  href="CastleTextureImages.html#LoadTextureImage">LoadTextureImage</a></b>(const FileName: string; out DDS: <a  href="CastleDDS.TDDSImage.html">TDDSImage</a>): <a  href="CastleImages.TEncodedImage.html">TEncodedImage</a>; overload;</code></td>
 
40
</tr>
 
41
<tr class="list2">
 
42
<td class="itemcode"><code>function <b><a  href="CastleTextureImages.html#LoadTextureImage">LoadTextureImage</a></b>(const FileName: string): <a  href="CastleImages.TEncodedImage.html">TEncodedImage</a>; overload;</code></td>
 
43
</tr>
 
44
</table>
 
45
<a name="PasDoc-Constants"></a><h3 class="summary">Constants</h3>
 
46
<table class="summary wide_list">
 
47
<tr class="list">
 
48
<td class="itemcode"><code><b><a  href="CastleTextureImages.html#TextureImageClasses">TextureImageClasses</a></b>: array [0..3] of <a  href="CastleImages.html#TCastleImageClass">TCastleImageClass</a> = (
 
49
    <a  href="CastleImages.TRGBImage.html">TRGBImage</a>,
 
50
    <a  href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a>,
 
51
    <a  href="CastleImages.TGrayscaleImage.html">TGrayscaleImage</a>,
 
52
    <a  href="CastleImages.TGrayscaleAlphaImage.html">TGrayscaleAlphaImage</a>);</code></td>
 
53
</tr>
 
54
<tr class="list2">
 
55
<td class="itemcode"><code><b><a  href="CastleTextureImages.html#TextureImageClassesAll">TextureImageClassesAll</a></b>: array [0..5] of <a  href="CastleImages.html#TEncodedImageClass">TEncodedImageClass</a> = (
 
56
    <a  href="CastleImages.TRGBImage.html">TRGBImage</a>,
 
57
    <a  href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a>,
 
58
    <a  href="CastleImages.TGrayscaleImage.html">TGrayscaleImage</a>,
 
59
    <a  href="CastleImages.TGrayscaleAlphaImage.html">TGrayscaleAlphaImage</a>,
 
60
    <a  href="CastleImages.TS3TCImage.html">TS3TCImage</a>,
 
61
    <a  href="CastleImages.TRGBFloatImage.html">TRGBFloatImage</a>);</code></td>
 
62
</tr>
 
63
</table>
 
64
<h2 class="description">Description</h2>
 
65
<h3 class="detail">Functions and Procedures</h3>
 
66
<table class="detail wide_list">
 
67
<tr class="list">
 
68
<td class="itemcode"><a name="LoadTextureImage"></a><code>function <b>LoadTextureImage</b>(const FileName: string; out DDS: <a  href="CastleDDS.TDDSImage.html">TDDSImage</a>): <a  href="CastleImages.TEncodedImage.html">TEncodedImage</a>; overload;</code></td>
 
69
</tr>
 
70
<tr><td colspan="1">
 
71
<p>
 
72
Load image suitable for a texture. This will load image to memory formats supported by common 3D libraries (like OpenGL), for example it will never return <a class="normal" href="CastleImages.TRGBFloatImage.html">TRGBFloatImage</a> (although OpenGL may support it, but we cannot be sure at this point). It may return S3TC encoded image.
 
73
 
 
74
<p>If the image comes from a DDS file, it will also return it (if not, DDS returned will be <code>Nil</code>). This allows you to e.g. use texture mipmaps recorded there. Note that DDS.OwnsFirstImage is set to <code>False</code>, so you can always safely free everything by simple <code>FreeAndNil(Image); FreeAndNil(DDS);</code>.
 
75
 
 
76
<p>Overloaded version without DDS parameter assumes you're not interested in this information (still it handles DDS files of course, it just doesn't return DDS object instance).
 
77
 
 
78
<p></p>
 
79
</td></tr>
 
80
</table>
 
81
<table class="detail wide_list">
 
82
<tr class="list">
 
83
<td class="itemcode"><a name="LoadTextureImage"></a><code>function <b>LoadTextureImage</b>(const FileName: string): <a  href="CastleImages.TEncodedImage.html">TEncodedImage</a>; overload;</code></td>
 
84
</tr>
 
85
<tr><td colspan="1">
 
86
&nbsp;</td></tr>
 
87
</table>
 
88
<h3 class="detail">Constants</h3>
 
89
<table class="detail wide_list">
 
90
<tr class="list">
 
91
<td class="itemcode"><a name="TextureImageClasses"></a><code><b>TextureImageClasses</b>: array [0..3] of <a  href="CastleImages.html#TCastleImageClass">TCastleImageClass</a> = (
 
92
    <a  href="CastleImages.TRGBImage.html">TRGBImage</a>,
 
93
    <a  href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a>,
 
94
    <a  href="CastleImages.TGrayscaleImage.html">TGrayscaleImage</a>,
 
95
    <a  href="CastleImages.TGrayscaleAlphaImage.html">TGrayscaleAlphaImage</a>);</code></td>
 
96
</tr>
 
97
<tr><td colspan="1">
 
98
<p>
 
99
Image classes that are handled by absolutely all OpenGL versions.</p>
 
100
</td></tr>
 
101
</table>
 
102
<table class="detail wide_list">
 
103
<tr class="list">
 
104
<td class="itemcode"><a name="TextureImageClassesAll"></a><code><b>TextureImageClassesAll</b>: array [0..5] of <a  href="CastleImages.html#TEncodedImageClass">TEncodedImageClass</a> = (
 
105
    <a  href="CastleImages.TRGBImage.html">TRGBImage</a>,
 
106
    <a  href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a>,
 
107
    <a  href="CastleImages.TGrayscaleImage.html">TGrayscaleImage</a>,
 
108
    <a  href="CastleImages.TGrayscaleAlphaImage.html">TGrayscaleAlphaImage</a>,
 
109
    <a  href="CastleImages.TS3TCImage.html">TS3TCImage</a>,
 
110
    <a  href="CastleImages.TRGBFloatImage.html">TRGBFloatImage</a>);</code></td>
 
111
</tr>
 
112
<tr><td colspan="1">
 
113
<p>
 
114
All image classes that may be handled by OpenGL. Some of them may require specific OpenGL extensions or versions (like S3TC or float textures).</p>
 
115
</td></tr>
 
116
</table>
 
117
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.12.1</a> on 2013-02-04 20:26:52</em>
 
118
</span>
 
119
</td></tr></table></body></html>