| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <title>gameplay: Main Page</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { searchBox.OnSelectItem(0); });
- </script>
- </head>
- <body>
- <div id="top"><!-- do not remove this div! -->
- <!-- Generated by Doxygen 1.8.0 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="annotated.html"><span>Classes</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="files.html"><span>File List</span></a></li>
- </ul>
- </div>
- </div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a></div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div class="header">
- <div class="headertitle">
- <div class="title">gameplay/src/Texture.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef TEXTURE_H_</span>
- <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define TEXTURE_H_</span>
- <a name="l00003"></a>00003 <span class="preprocessor"></span>
- <a name="l00004"></a>00004 <span class="preprocessor">#include "Ref.h"</span>
- <a name="l00005"></a>00005
- <a name="l00006"></a>00006 <span class="keyword">namespace </span>gameplay
- <a name="l00007"></a>00007 {
- <a name="l00008"></a>00008
- <a name="l00009"></a>00009 <span class="keyword">class </span>Image;
- <a name="l00010"></a>00010
- <a name="l00018"></a><a class="code" href="classgameplay_1_1_texture.html">00018</a> <span class="keyword">class </span><a class="code" href="classgameplay_1_1_texture.html">Texture</a> : <span class="keyword">public</span> <a class="code" href="classgameplay_1_1_ref.html">Ref</a>
- <a name="l00019"></a>00019 {
- <a name="l00020"></a>00020 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">Sampler</a>;
- <a name="l00021"></a>00021
- <a name="l00022"></a>00022 <span class="keyword">public</span>:
- <a name="l00023"></a>00023
- <a name="l00027"></a><a class="code" href="classgameplay_1_1_texture.html#a062414a71169c01a7ae7af0c221d8645">00027</a> <span class="keyword">enum</span> <a class="code" href="classgameplay_1_1_texture.html#a062414a71169c01a7ae7af0c221d8645">Format</a>
- <a name="l00028"></a>00028 {
- <a name="l00029"></a>00029 RGB = GL_RGB,
- <a name="l00030"></a>00030 RGBA = GL_RGBA,
- <a name="l00031"></a>00031 ALPHA = GL_ALPHA,
- <a name="l00032"></a>00032 DEPTH = GL_DEPTH_COMPONENT,
- <a name="l00033"></a>00033 <span class="preprocessor">#ifdef USE_PVRTC</span>
- <a name="l00034"></a>00034 <span class="preprocessor"></span> COMPRESSED_RGB_PVRTC_4BPP = GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,
- <a name="l00035"></a>00035 COMPRESSED_RGBA_PVRTC_4BPP = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,
- <a name="l00036"></a>00036 COMPRESSED_RGB_PVRTC_2BPP = GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,
- <a name="l00037"></a>00037 COMPRESSED_RGBA_PVRTC_2BPP = GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
- <a name="l00038"></a>00038 <span class="preprocessor">#endif</span>
- <a name="l00039"></a>00039 <span class="preprocessor"></span> };
- <a name="l00040"></a>00040
- <a name="l00044"></a><a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">00044</a> <span class="keyword">enum</span> <a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a>
- <a name="l00045"></a>00045 {
- <a name="l00046"></a>00046 NEAREST = GL_NEAREST,
- <a name="l00047"></a>00047 LINEAR = GL_LINEAR,
- <a name="l00048"></a>00048 NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST,
- <a name="l00049"></a>00049 LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST,
- <a name="l00050"></a>00050 NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR,
- <a name="l00051"></a>00051 LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR
- <a name="l00052"></a>00052 };
- <a name="l00053"></a>00053
- <a name="l00057"></a><a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">00057</a> <span class="keyword">enum</span> <a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a>
- <a name="l00058"></a>00058 {
- <a name="l00059"></a>00059 REPEAT = GL_REPEAT,
- <a name="l00060"></a>00060 CLAMP = GL_CLAMP_TO_EDGE
- <a name="l00061"></a>00061 };
- <a name="l00062"></a>00062
- <a name="l00071"></a><a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">00071</a> <span class="keyword">class </span><a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">Sampler</a> : <span class="keyword">public</span> <a class="code" href="classgameplay_1_1_ref.html">Ref</a>
- <a name="l00072"></a>00072 {
- <a name="l00073"></a>00073 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classgameplay_1_1_texture.html">Texture</a>;
- <a name="l00074"></a>00074
- <a name="l00075"></a>00075 <span class="keyword">public</span>:
- <a name="l00076"></a>00076
- <a name="l00084"></a>00084 <span class="keyword">static</span> <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">Sampler</a>* <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html#afab865d64e103a3bf438d5e77c6bc853">create</a>(<a class="code" href="classgameplay_1_1_texture.html">Texture</a>* texture);
- <a name="l00085"></a>00085
- <a name="l00094"></a>00094 <span class="keyword">static</span> <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">Sampler</a>* <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html#afab865d64e103a3bf438d5e77c6bc853">create</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* path, <span class="keywordtype">bool</span> <a class="code" href="classgameplay_1_1_texture.html#a502cf79334ec038207332c1047fff0cf">generateMipmaps</a> = <span class="keyword">false</span>);
- <a name="l00095"></a>00095
- <a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html#a5e34071db6338c8ca82545b3b5e76540">setWrapMode</a>(<a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a> wrapS, <a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a> wrapT);
- <a name="l00103"></a>00103
- <a name="l00110"></a>00110 <span class="keywordtype">void</span> <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html#a503df7c6724baf9c1fdd49722cc391c1">setFilterMode</a>(<a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a> minificationFilter, <a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a> magnificationFilter);
- <a name="l00111"></a>00111
- <a name="l00115"></a>00115 <a class="code" href="classgameplay_1_1_texture.html">Texture</a>* <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html#a6970128beb567c88b9fead66ba910bab">getTexture</a>() <span class="keyword">const</span>;
- <a name="l00116"></a>00116
- <a name="l00120"></a>00120 <span class="keywordtype">void</span> <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html#a25372f518083a0a6fa43c01499b77005">bind</a>();
- <a name="l00121"></a>00121
- <a name="l00122"></a>00122 <span class="keyword">private</span>:
- <a name="l00123"></a>00123
- <a name="l00124"></a>00124 <a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">Sampler</a>(<a class="code" href="classgameplay_1_1_texture.html">Texture</a>* texture);
- <a name="l00125"></a>00125 ~<a class="code" href="classgameplay_1_1_texture_1_1_sampler.html">Sampler</a>();
- <a name="l00126"></a>00126
- <a name="l00127"></a>00127 <a class="code" href="classgameplay_1_1_texture.html">Texture</a>* _texture;
- <a name="l00128"></a>00128 <a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a> _wrapS;
- <a name="l00129"></a>00129 <a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a> _wrapT;
- <a name="l00130"></a>00130 <a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a> _minFilter;
- <a name="l00131"></a>00131 <a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a> _magFilter;
- <a name="l00132"></a>00132 };
- <a name="l00133"></a>00133
- <a name="l00142"></a>00142 <span class="keyword">static</span> <a class="code" href="classgameplay_1_1_texture.html">Texture</a>* <a class="code" href="classgameplay_1_1_texture.html#abd9c85cfbbba9068ed9b50a64288d609">create</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* path, <span class="keywordtype">bool</span> <a class="code" href="classgameplay_1_1_texture.html#a502cf79334ec038207332c1047fff0cf">generateMipmaps</a> = <span class="keyword">false</span>);
- <a name="l00143"></a>00143
- <a name="l00147"></a>00147 <span class="keyword">static</span> <a class="code" href="classgameplay_1_1_texture.html">Texture</a>* <a class="code" href="classgameplay_1_1_texture.html#abd9c85cfbbba9068ed9b50a64288d609">create</a>(<a class="code" href="classgameplay_1_1_image.html">Image</a>* image, <span class="keywordtype">bool</span> <a class="code" href="classgameplay_1_1_texture.html#a502cf79334ec038207332c1047fff0cf">generateMipmaps</a> = <span class="keyword">false</span>);
- <a name="l00148"></a>00148
- <a name="l00152"></a>00152 <span class="keyword">static</span> <a class="code" href="classgameplay_1_1_texture.html">Texture</a>* <a class="code" href="classgameplay_1_1_texture.html#abd9c85cfbbba9068ed9b50a64288d609">create</a>(<a class="code" href="classgameplay_1_1_texture.html#a062414a71169c01a7ae7af0c221d8645">Format</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data, <span class="keywordtype">bool</span> <a class="code" href="classgameplay_1_1_texture.html#a502cf79334ec038207332c1047fff0cf">generateMipmaps</a> = <span class="keyword">false</span>);
- <a name="l00153"></a>00153
- <a name="l00157"></a>00157 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgameplay_1_1_texture.html#a80bddd8745b36e0c51cf54adbb1a55f6">getWidth</a>() <span class="keyword">const</span>;
- <a name="l00158"></a>00158
- <a name="l00162"></a>00162 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classgameplay_1_1_texture.html#a5c84500dc18a15edfc4b6644c6e07673">getHeight</a>() <span class="keyword">const</span>;
- <a name="l00163"></a>00163
- <a name="l00170"></a>00170 <span class="keywordtype">void</span> <a class="code" href="classgameplay_1_1_texture.html#af80fb9c40c8db751c41b2c9e51ba64d9">setWrapMode</a>(<a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a> wrapS, <a class="code" href="classgameplay_1_1_texture.html#a1be9d041e4548acc075d5254c642a4ac">Wrap</a> wrapT);
- <a name="l00171"></a>00171
- <a name="l00178"></a>00178 <span class="keywordtype">void</span> <a class="code" href="classgameplay_1_1_texture.html#a6eea0fd7b3b95c1fa5fc03d086c232fc">setFilterMode</a>(<a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a> minificationFilter, <a class="code" href="classgameplay_1_1_texture.html#a17d2554f8fb6b579843f5fe348dc887e">Filter</a> magnificationFilter);
- <a name="l00179"></a>00179
- <a name="l00183"></a>00183 <span class="keywordtype">void</span> <a class="code" href="classgameplay_1_1_texture.html#a502cf79334ec038207332c1047fff0cf">generateMipmaps</a>();
- <a name="l00184"></a>00184
- <a name="l00190"></a>00190 <span class="keywordtype">bool</span> <a class="code" href="classgameplay_1_1_texture.html#abdfd19cb06395db4fdfaaef5a4bc9452">isMipmapped</a>() <span class="keyword">const</span>;
- <a name="l00191"></a>00191
- <a name="l00197"></a>00197 TextureHandle <a class="code" href="classgameplay_1_1_texture.html#adc521b76e2a09c12c34851da8f4fe600">getHandle</a>() <span class="keyword">const</span>;
- <a name="l00198"></a>00198
- <a name="l00199"></a>00199 <span class="keyword">private</span>:
- <a name="l00200"></a>00200
- <a name="l00204"></a>00204 <a class="code" href="classgameplay_1_1_texture.html">Texture</a>();
- <a name="l00205"></a>00205
- <a name="l00209"></a>00209 <a class="code" href="classgameplay_1_1_texture.html">Texture</a>(<span class="keyword">const</span> <a class="code" href="classgameplay_1_1_texture.html">Texture</a>& copy);
- <a name="l00210"></a>00210
- <a name="l00214"></a>00214 <span class="keyword">virtual</span> ~<a class="code" href="classgameplay_1_1_texture.html">Texture</a>();
- <a name="l00215"></a>00215
- <a name="l00216"></a>00216 <span class="preprocessor">#ifdef USE_PVRTC</span>
- <a name="l00217"></a>00217 <span class="preprocessor"></span> <span class="keyword">static</span> <a class="code" href="classgameplay_1_1_texture.html">Texture</a>* createCompressedPVRTC(<span class="keyword">const</span> <span class="keywordtype">char</span>* path);
- <a name="l00218"></a>00218 <span class="preprocessor">#endif</span>
- <a name="l00219"></a>00219 <span class="preprocessor"></span>
- <a name="l00220"></a>00220 std::string _path;
- <a name="l00221"></a>00221 TextureHandle _handle;
- <a name="l00222"></a>00222 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _width;
- <a name="l00223"></a>00223 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _height;
- <a name="l00224"></a>00224 <span class="keywordtype">bool</span> _mipmapped;
- <a name="l00225"></a>00225 <span class="keywordtype">bool</span> _cached;
- <a name="l00226"></a>00226 };
- <a name="l00227"></a>00227
- <a name="l00228"></a>00228 }
- <a name="l00229"></a>00229
- <a name="l00230"></a>00230 <span class="preprocessor">#endif</span>
- </pre></div></div><!-- contents -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Fri May 18 2012 12:10:37 for gameplay by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.0
- </small></address>
- </body>
- </html>
|