source: OGRE/trunk/ogrenew/Docs/api/html/classOgre_1_1GLPixelUtil.html @ 692

Revision 692, 15.5 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>Ogre::GLPixelUtil class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1>Ogre::GLPixelUtil Class Reference</h1>Class to do pixel format mapping between GL and OGRE. 
11<a href="#_details">More...</a>
12<p>
13<code>#include &lt;<a class="el" href="OgreGLPixelFormat_8h-source.html">OgreGLPixelFormat.h</a>&gt;</code>
14<p>
15<a href="classOgre_1_1GLPixelUtil-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
16<tr><td></td></tr>
17<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
18<tr><td class="memItemLeft" nowrap align=right valign=top>GLenum&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile0">getGLOriginFormat</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> mFormat)</td></tr>
19
20<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Takes the OGRE pixel format and returns the appropriate GL one.  <a href="#Ogre_1_1GLPixelUtile0"></a><br><br></td></tr>
21<tr><td class="memItemLeft" nowrap align=right valign=top>GLenum&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile1">getGLOriginDataType</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> mFormat)</td></tr>
22
23<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Takes the OGRE pixel format and returns type that must be provided to GL as data type for reading it into the GPU.  <a href="#Ogre_1_1GLPixelUtile1"></a><br><br></td></tr>
24<tr><td class="memItemLeft" nowrap align=right valign=top>GLenum&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile2">getGLInternalFormat</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> mFormat)</td></tr>
25
26<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Takes the OGRE pixel format and returns the type that must be provided to GL as internal format.  <a href="#Ogre_1_1GLPixelUtile2"></a><br><br></td></tr>
27<tr><td class="memItemLeft" nowrap align=right valign=top>GLenum&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile3">getClosestGLInternalFormat</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> mFormat)</td></tr>
28
29<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Takes the OGRE pixel format and returns the type that must be provided to GL as internal format.  <a href="#Ogre_1_1GLPixelUtile3"></a><br><br></td></tr>
30<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile4">getClosestOGREFormat</a> (GLenum fmt)</td></tr>
31
32<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function to get the closest matching OGRE format to an internal GL format.  <a href="#Ogre_1_1GLPixelUtile4"></a><br><br></td></tr>
33<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile5">getMaxMipmaps</a> (size_t width, size_t height, size_t depth, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
34
35<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the maximum number of Mipmaps that can be generated until we reach the mininum format possible.  <a href="#Ogre_1_1GLPixelUtile5"></a><br><br></td></tr>
36<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1GLPixelUtil.html#Ogre_1_1GLPixelUtile6">optionalPO2</a> (size_t value)</td></tr>
37
38<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns next power-of-two size if required by render system, in case RSC_NON_POWER_OF_2_TEXTURES is supported it returns value as-is.  <a href="#Ogre_1_1GLPixelUtile6"></a><br><br></td></tr>
39</table>
40<hr><a name="_details"></a><h2>Detailed Description</h2>
41Class to do pixel format mapping between GL and OGRE.
42<p>
43
44<p>
45Definition at line <a class="el" href="OgreGLPixelFormat_8h-source.html#l00035">35</a> of file <a class="el" href="OgreGLPixelFormat_8h-source.html">OgreGLPixelFormat.h</a>.<hr><h2>Member Function Documentation</h2>
46<a class="anchor" name="Ogre_1_1GLPixelUtile3" doxytag="Ogre::GLPixelUtil::getClosestGLInternalFormat" ></a><p>
47<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
48  <tr>
49    <td class="mdRow">
50      <table cellpadding="0" cellspacing="0" border="0">
51        <tr>
52          <td class="md" nowrap valign="top"> GLenum Ogre::GLPixelUtil::getClosestGLInternalFormat </td>
53          <td class="md" valign="top">(&nbsp;</td>
54          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
55          <td class="mdname1" valign="top" nowrap> <em>mFormat</em>          </td>
56          <td class="md" valign="top">&nbsp;)&nbsp;</td>
57          <td class="md" nowrap><code> [static]</code></td>
58        </tr>
59
60      </table>
61    </td>
62  </tr>
63</table>
64<table cellspacing=5 cellpadding=0 border=0>
65  <tr>
66    <td>
67      &nbsp;
68    </td>
69    <td>
70
71<p>
72Takes the OGRE pixel format and returns the type that must be provided to GL as internal format.
73<p>
74If no match exists, returns the closest match.    </td>
75  </tr>
76</table>
77<a class="anchor" name="Ogre_1_1GLPixelUtile4" doxytag="Ogre::GLPixelUtil::getClosestOGREFormat" ></a><p>
78<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
79  <tr>
80    <td class="mdRow">
81      <table cellpadding="0" cellspacing="0" border="0">
82        <tr>
83          <td class="md" nowrap valign="top"> <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> Ogre::GLPixelUtil::getClosestOGREFormat </td>
84          <td class="md" valign="top">(&nbsp;</td>
85          <td class="md" nowrap valign="top">GLenum&nbsp;</td>
86          <td class="mdname1" valign="top" nowrap> <em>fmt</em>          </td>
87          <td class="md" valign="top">&nbsp;)&nbsp;</td>
88          <td class="md" nowrap><code> [static]</code></td>
89        </tr>
90
91      </table>
92    </td>
93  </tr>
94</table>
95<table cellspacing=5 cellpadding=0 border=0>
96  <tr>
97    <td>
98      &nbsp;
99    </td>
100    <td>
101
102<p>
103Function to get the closest matching OGRE format to an internal GL format.
104<p>
105To be precise, the format will be chosen that is most efficient to transfer to the card without losing precision. <dl compact><dt><b>Remarks:</b></dt><dd>It is valid for this function to always return PF_A8R8G8B8.</dd></dl>
106    </td>
107  </tr>
108</table>
109<a class="anchor" name="Ogre_1_1GLPixelUtile2" doxytag="Ogre::GLPixelUtil::getGLInternalFormat" ></a><p>
110<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
111  <tr>
112    <td class="mdRow">
113      <table cellpadding="0" cellspacing="0" border="0">
114        <tr>
115          <td class="md" nowrap valign="top"> GLenum Ogre::GLPixelUtil::getGLInternalFormat </td>
116          <td class="md" valign="top">(&nbsp;</td>
117          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
118          <td class="mdname1" valign="top" nowrap> <em>mFormat</em>          </td>
119          <td class="md" valign="top">&nbsp;)&nbsp;</td>
120          <td class="md" nowrap><code> [static]</code></td>
121        </tr>
122
123      </table>
124    </td>
125  </tr>
126</table>
127<table cellspacing=5 cellpadding=0 border=0>
128  <tr>
129    <td>
130      &nbsp;
131    </td>
132    <td>
133
134<p>
135Takes the OGRE pixel format and returns the type that must be provided to GL as internal format.
136<p>
137GL_NONE if no match exists.    </td>
138  </tr>
139</table>
140<a class="anchor" name="Ogre_1_1GLPixelUtile1" doxytag="Ogre::GLPixelUtil::getGLOriginDataType" ></a><p>
141<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
142  <tr>
143    <td class="mdRow">
144      <table cellpadding="0" cellspacing="0" border="0">
145        <tr>
146          <td class="md" nowrap valign="top"> GLenum Ogre::GLPixelUtil::getGLOriginDataType </td>
147          <td class="md" valign="top">(&nbsp;</td>
148          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
149          <td class="mdname1" valign="top" nowrap> <em>mFormat</em>          </td>
150          <td class="md" valign="top">&nbsp;)&nbsp;</td>
151          <td class="md" nowrap><code> [static]</code></td>
152        </tr>
153
154      </table>
155    </td>
156  </tr>
157</table>
158<table cellspacing=5 cellpadding=0 border=0>
159  <tr>
160    <td>
161      &nbsp;
162    </td>
163    <td>
164
165<p>
166Takes the OGRE pixel format and returns type that must be provided to GL as data type for reading it into the GPU.
167<p>
168<dl compact><dt><b>Returns:</b></dt><dd>a GLenum describing the data type, or 0 if there is no exactly matching one (and conversion is needed)</dd></dl>
169    </td>
170  </tr>
171</table>
172<a class="anchor" name="Ogre_1_1GLPixelUtile0" doxytag="Ogre::GLPixelUtil::getGLOriginFormat" ></a><p>
173<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
174  <tr>
175    <td class="mdRow">
176      <table cellpadding="0" cellspacing="0" border="0">
177        <tr>
178          <td class="md" nowrap valign="top"> GLenum Ogre::GLPixelUtil::getGLOriginFormat </td>
179          <td class="md" valign="top">(&nbsp;</td>
180          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
181          <td class="mdname1" valign="top" nowrap> <em>mFormat</em>          </td>
182          <td class="md" valign="top">&nbsp;)&nbsp;</td>
183          <td class="md" nowrap><code> [static]</code></td>
184        </tr>
185
186      </table>
187    </td>
188  </tr>
189</table>
190<table cellspacing=5 cellpadding=0 border=0>
191  <tr>
192    <td>
193      &nbsp;
194    </td>
195    <td>
196
197<p>
198Takes the OGRE pixel format and returns the appropriate GL one.
199<p>
200<dl compact><dt><b>Returns:</b></dt><dd>a GLenum describing the format, or 0 if there is no exactly matching one (and conversion is needed)</dd></dl>
201    </td>
202  </tr>
203</table>
204<a class="anchor" name="Ogre_1_1GLPixelUtile5" doxytag="Ogre::GLPixelUtil::getMaxMipmaps" ></a><p>
205<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
206  <tr>
207    <td class="mdRow">
208      <table cellpadding="0" cellspacing="0" border="0">
209        <tr>
210          <td class="md" nowrap valign="top"> size_t Ogre::GLPixelUtil::getMaxMipmaps </td>
211          <td class="md" valign="top">(&nbsp;</td>
212          <td class="md" nowrap valign="top">size_t&nbsp;</td>
213          <td class="mdname" nowrap> <em>width</em>, </td>
214        </tr>
215        <tr>
216          <td class="md" nowrap align="right"></td>
217          <td></td>
218          <td class="md" nowrap>size_t&nbsp;</td>
219          <td class="mdname" nowrap> <em>height</em>, </td>
220        </tr>
221        <tr>
222          <td class="md" nowrap align="right"></td>
223          <td></td>
224          <td class="md" nowrap>size_t&nbsp;</td>
225          <td class="mdname" nowrap> <em>depth</em>, </td>
226        </tr>
227        <tr>
228          <td class="md" nowrap align="right"></td>
229          <td></td>
230          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
231          <td class="mdname" nowrap> <em>format</em></td>
232        </tr>
233        <tr>
234          <td></td>
235          <td class="md">)&nbsp;</td>
236          <td class="md" colspan="2"><code> [static]</code></td>
237        </tr>
238
239      </table>
240    </td>
241  </tr>
242</table>
243<table cellspacing=5 cellpadding=0 border=0>
244  <tr>
245    <td>
246      &nbsp;
247    </td>
248    <td>
249
250<p>
251Returns the maximum number of Mipmaps that can be generated until we reach the mininum format possible.
252<p>
253This does not count the base level. <dl compact><dt><b>Parameters:</b></dt><dd>
254  <table border="0" cellspacing="2" cellpadding="0">
255    <tr><td valign=top><em>width</em>&nbsp;</td><td>The width of the area </td></tr>
256    <tr><td valign=top><em>height</em>&nbsp;</td><td>The height of the area </td></tr>
257    <tr><td valign=top><em>depth</em>&nbsp;</td><td>The depth of the area </td></tr>
258    <tr><td valign=top><em>format</em>&nbsp;</td><td>The format of the area </td></tr>
259  </table>
260</dl>
261<dl compact><dt><b>Remarks:</b></dt><dd>In case that the format is non-compressed, this simply returns how many times we can divide this texture in 2 until we reach 1x1. For compressed formats, constraints apply on minimum size and alignment so this might differ.</dd></dl>
262    </td>
263  </tr>
264</table>
265<a class="anchor" name="Ogre_1_1GLPixelUtile6" doxytag="Ogre::GLPixelUtil::optionalPO2" ></a><p>
266<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
267  <tr>
268    <td class="mdRow">
269      <table cellpadding="0" cellspacing="0" border="0">
270        <tr>
271          <td class="md" nowrap valign="top"> size_t Ogre::GLPixelUtil::optionalPO2 </td>
272          <td class="md" valign="top">(&nbsp;</td>
273          <td class="md" nowrap valign="top">size_t&nbsp;</td>
274          <td class="mdname1" valign="top" nowrap> <em>value</em>          </td>
275          <td class="md" valign="top">&nbsp;)&nbsp;</td>
276          <td class="md" nowrap><code> [static]</code></td>
277        </tr>
278
279      </table>
280    </td>
281  </tr>
282</table>
283<table cellspacing=5 cellpadding=0 border=0>
284  <tr>
285    <td>
286      &nbsp;
287    </td>
288    <td>
289
290<p>
291Returns next power-of-two size if required by render system, in case RSC_NON_POWER_OF_2_TEXTURES is supported it returns value as-is.
292<p>
293    </td>
294  </tr>
295</table>
296<hr>The documentation for this class was generated from the following file:<ul>
297<li><a class="el" href="OgreGLPixelFormat_8h-source.html">OgreGLPixelFormat.h</a></ul>
298<hr>
299<p>
300Copyright &copy; 2000-2005 by The OGRE Team<br />
301<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
302This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
303                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
304                <Work rdf:about="">
305                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
306        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
307                </Work>
308                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
309
310Last modified Sun Mar 12 14:53:04 2006
311</p>
312</body>
313</html>
Note: See TracBrowser for help on using the repository browser.