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

Revision 692, 27.0 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>OgreD3D9Texture.h Source File - 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>OgreD3D9Texture.h</h1><a href="OgreD3D9Texture_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>
1100002 <span class="comment">-----------------------------------------------------------------------------</span>
1200003 <span class="comment">This source file is part of OGRE</span>
1300004 <span class="comment">    (Object-oriented Graphics Rendering Engine)</span>
1400005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
1500006 <span class="comment"></span>
1600007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
1700008 <span class="comment">Also see acknowledgements in Readme.html</span>
1800009 <span class="comment"></span>
1900010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span>
2000011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span>
2100012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span>
2200013 <span class="comment">version.</span>
2300014 <span class="comment"></span>
2400015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span>
2500016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
2600017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span>
2700018 <span class="comment"></span>
2800019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span>
2900020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span>
3000021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span>
3100022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span>
3200023 <span class="comment">-----------------------------------------------------------------------------</span>
3300024 <span class="comment">*/</span>
3400025 <span class="preprocessor">#ifndef __D3D8TEXTURE_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __D3D8TEXTURE_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgreD3D9Prerequisites_8h.html">OgreD3D9Prerequisites.h</a>"</span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgreTexture_8h.html">OgreTexture.h</a>"</span>
3900030 <span class="preprocessor">#include "<a class="code" href="OgreRenderTexture_8h.html">OgreRenderTexture.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreImage_8h.html">OgreImage.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreException_8h.html">OgreException.h</a>"</span>
4200033 <span class="preprocessor">#include "<a class="code" href="OgreD3D9HardwarePixelBuffer_8h.html">OgreD3D9HardwarePixelBuffer.h</a>"</span>
4300034
4400035 <span class="preprocessor">#include "<a class="code" href="OgreNoMemoryMacros_8h.html">OgreNoMemoryMacros.h</a>"</span>
4500036 <span class="preprocessor">#include &lt;d3d9.h&gt;</span>
4600037 <span class="preprocessor">#include &lt;d3dx9.h&gt;</span>
4700038 <span class="preprocessor">#include &lt;dxerr9.h&gt;</span>
4800039 <span class="preprocessor">#include "<a class="code" href="OgreMemoryMacros_8h.html">OgreMemoryMacros.h</a>"</span>
4900040
5000041 <span class="keyword">namespace </span>Ogre {
51<a name="l00042"></a><a class="code" href="classOgre_1_1D3D9Texture.html">00042</a>     <span class="keyword">class </span><a class="code" href="classOgre_1_1D3D9Texture.html">D3D9Texture</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1Texture.html">Texture</a>
5200043     {
5300044     <span class="keyword">protected</span>:
54<a name="l00046"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep0">00046</a>         IDirect3DDevice9        *mpDev;     
55<a name="l00048"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep1">00048</a>         IDirect3D9              *mpD3D;
56<a name="l00050"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep2">00050</a>         IDirect3DTexture9       *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep2">mpNormTex</a>;
57<a name="l00052"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep3">00052</a>         IDirect3DCubeTexture9   *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep3">mpCubeTex</a>;
58<a name="l00054"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep4">00054</a>         IDirect3DVolumeTexture9 *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep4">mpVolumeTex</a>;
59<a name="l00056"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep5">00056</a>         IDirect3DBaseTexture9   *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep5">mpTex</a>;     
6000057
61<a name="l00059"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep6">00059</a>         <a class="code" href="namespaceOgre.html#a471">String</a>                          <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep6">mCubeFaceNames</a>[6];
62<a name="l00061"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep7">00061</a>         D3DDEVICE_CREATION_PARAMETERS   <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep7">mDevCreParams</a>;
63<a name="l00063"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep8">00063</a>         D3DFORMAT                       <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep8">mBBPixelFormat</a>;
64<a name="l00065"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep9">00065</a>         D3DPOOL                         mD3DPool;
65<a name="l00067"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep10">00067</a>         D3DCAPS9                        <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep10">mDevCaps</a>;
6600068         <span class="comment">// Dynamic textures?</span>
67<a name="l00069"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep11">00069</a>         <span class="keywordtype">bool</span>                            <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep11">mDynamicTextures</a>;
68<a name="l00071"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturex0">00071</a>         <span class="keyword">typedef</span> std::vector&lt;HardwarePixelBufferSharedPtr&gt; <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturex0">SurfaceList</a>;
69<a name="l00072"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep12">00072</a>         <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturex0">SurfaceList</a>                     <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep12">mSurfaceList</a>;
7000073     
7100075         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb0">_initDevice</a>(<span class="keywordtype">void</span>);
7200077         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb1">_loadCubeTex</a>();
7300079         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb2">_loadNormTex</a>();
7400081         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb3">_loadVolumeTex</a>();
7500082
7600084         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb4">_createNormTex</a>();
7700086         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb5">_createCubeTex</a>();
7800088         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb6">_createVolumeTex</a>();
7900089
8000091         D3DFORMAT <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb7">_chooseD3DFormat</a>();
8100092
8200094         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb8">createInternalResourcesImpl</a>(<span class="keywordtype">void</span>);
8300096         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb9">freeInternalResourcesImpl</a>(<span class="keywordtype">void</span>);
8400098         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb10">_setSrcAttributes</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> height, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> depth, PixelFormat format);
8500100         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb11">_setFinalAttributes</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> height, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> depth, PixelFormat format);
8600102         D3DTEXTUREFILTERTYPE <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb12">_getBestFilterMethod</a>();
8700104         <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb13">_canUseDynamicTextures</a>(DWORD srcUsage, D3DRESOURCETYPE srcType, D3DFORMAT srcFormat);
8800106         <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb14">_canAutoGenMipmaps</a>(DWORD srcUsage, D3DRESOURCETYPE srcType, D3DFORMAT srcFormat);
8900107         
90<a name="l00109"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb15">00109</a>         <a class="code" href="namespaceOgre.html#a471">String</a> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb15">_getCubeFaceName</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> face)<span class="keyword"> const</span>
9100110 <span class="keyword">        </span>{ assert(face &lt; 6); <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep6">mCubeFaceNames</a>[face]; }
9200111         
9300114         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb16">_createSurfaceList</a>(<span class="keywordtype">void</span>);
9400115
9500117         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Textureb17">loadImpl</a>();
9600118     <span class="keyword">public</span>:
9700120         <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea0">D3D9Texture</a>(<a class="code" href="classOgre_1_1ResourceManager.html">ResourceManager</a>* creator, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; name, <a class="code" href="namespaceOgre.html#a529">ResourceHandle</a> handle,
9800121             <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; group, <span class="keywordtype">bool</span> isManual, <a class="code" href="classOgre_1_1ManualResourceLoader.html">ManualResourceLoader</a>* loader,
9900122             IDirect3DDevice9 *pD3DDevice);
10000124         <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea1">~D3D9Texture</a>();
10100125
10200127         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea2">copyToTexture</a>( <a class="code" href="classOgre_1_1TexturePtr.html">TexturePtr</a>&amp; target );
10300129         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea3">loadImage</a>( <span class="keyword">const</span> <a class="code" href="classOgre_1_1Image.html">Image</a> &amp;img );
10400130
10500131
10600133         <a class="code" href="classOgre_1_1HardwarePixelBufferSharedPtr.html">HardwarePixelBufferSharedPtr</a> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea4">getBuffer</a>(size_t face, size_t mipmap);
10700134         
108<a name="l00136"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea5">00136</a>         IDirect3DBaseTexture9 *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea5">getTexture</a>()
10900137         { assert(<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep5">mpTex</a>); <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep5">mpTex</a>; }
110<a name="l00139"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea6">00139</a>         IDirect3DTexture9 *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea6">getNormTexture</a>()
11100140         { assert(<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep2">mpNormTex</a>); <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep2">mpNormTex</a>; }
112<a name="l00142"></a><a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea7">00142</a>         IDirect3DCubeTexture9 *<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea7">getCubeTexture</a>()
11300143         { assert(<a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep3">mpCubeTex</a>); <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturep3">mpCubeTex</a>; }
11400144         
11500145         
11600146
11700148         <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea8">releaseIfDefaultPool</a>(<span class="keywordtype">void</span>);
11800150         <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D9Texture.html#Ogre_1_1D3D9Texturea9">recreateIfDefaultPool</a>(LPDIRECT3DDEVICE9 pDev);
11900151
12000152     };
12100153
122<a name="l00160"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html">00160</a>     <span class="keyword">class </span><a class="code" href="classOgre_1_1D3D9TexturePtr.html">D3D9TexturePtr</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;D3D9Texture&gt;
12300161     {
12400162     <span class="keyword">public</span>:
125<a name="l00163"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra0">00163</a>         <a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra0">D3D9TexturePtr</a>() : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1D3D9Texture.html">D3D9Texture</a>&gt;() {}
126<a name="l00164"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra1">00164</a>         <span class="keyword">explicit</span> <a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra0">D3D9TexturePtr</a>(<a class="code" href="classOgre_1_1D3D9Texture.html">D3D9Texture</a>* rep) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1D3D9Texture.html">D3D9Texture</a>&gt;(rep) {}
127<a name="l00165"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra2">00165</a>         <a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra0">D3D9TexturePtr</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1D3D9TexturePtr.html">D3D9TexturePtr</a>&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1D3D9Texture.html">D3D9Texture</a>&gt;(r) {}
128<a name="l00166"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra3">00166</a>         <a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra0">D3D9TexturePtr</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1D3D9Texture.html">D3D9Texture</a>&gt;()
12900167         {
13000168             <span class="comment">// lock &amp; copy other mutex pointer</span>
13100169             <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
13200170             <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
13300171             pRep = static_cast&lt;D3D9Texture*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
13400172             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
13500173             <span class="keywordflow">if</span> (pUseCount)
13600174             {
13700175                 ++(*pUseCount);
13800176             }
13900177         }
14000178
141<a name="l00180"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra4">00180</a>         <a class="code" href="classOgre_1_1D3D9TexturePtr.html">D3D9TexturePtr</a>&amp; <a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra4">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r)
14200181         {
14300182             <span class="keywordflow">if</span> (pRep == static_cast&lt;D3D9Texture*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>()))
14400183                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
14500184             <a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtrb0">release</a>();
14600185             <span class="comment">// lock &amp; copy other mutex pointer</span>
14700186             <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
14800187             <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
14900188             pRep = static_cast&lt;D3D9Texture*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
15000189             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
15100190             <span class="keywordflow">if</span> (pUseCount)
15200191             {
15300192                 ++(*pUseCount);
15400193             }
15500194             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
15600195         }
157<a name="l00197"></a><a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra5">00197</a>         <a class="code" href="classOgre_1_1D3D9TexturePtr.html">D3D9TexturePtr</a>&amp; <a class="code" href="classOgre_1_1D3D9TexturePtr.html#Ogre_1_1D3D9TexturePtra4">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1TexturePtr.html">TexturePtr</a>&amp; r)
15800198         {
15900199             <span class="keywordflow">if</span> (pRep == static_cast&lt;D3D9Texture*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>()))
16000200                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
16100201             <a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtrb0">release</a>();
16200202             <span class="comment">// lock &amp; copy other mutex pointer</span>
16300203             <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
16400204             <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
16500205             pRep = static_cast&lt;D3D9Texture*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
16600206             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
16700207             <span class="keywordflow">if</span> (pUseCount)
16800208             {
16900209                 ++(*pUseCount);
17000210             }
17100211             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
17200212         }
17300213     };
17400214
175<a name="l00216"></a><a class="code" href="classOgre_1_1D3D9RenderTexture.html">00216</a>     <span class="keyword">class </span><a class="code" href="classOgre_1_1D3D9RenderTexture.html">D3D9RenderTexture</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1RenderTexture.html">RenderTexture</a>
17600217     {
17700218     <span class="keyword">public</span>:
178<a name="l00219"></a><a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea0">00219</a>         <a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea0">D3D9RenderTexture</a>(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a> &amp;name, <a class="code" href="classOgre_1_1D3D9HardwarePixelBuffer.html">D3D9HardwarePixelBuffer</a> *buffer):
17900220             <a class="code" href="classOgre_1_1RenderTexture.html">RenderTexture</a>(buffer, 0)
18000221         {
18100222             mName = name;
18200223         }
183<a name="l00224"></a><a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea1">00224</a>         <a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea1">~D3D9RenderTexture</a>() {}
18400225
185<a name="l00226"></a><a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea2">00226</a>         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea2">rebind</a>(<a class="code" href="classOgre_1_1D3D9HardwarePixelBuffer.html">D3D9HardwarePixelBuffer</a> *buffer)
18600227         {
18700228             mBuffer = buffer;
18800229             mWidth = mBuffer-&gt;<a class="code" href="classOgre_1_1HardwarePixelBuffer.html#Ogre_1_1HardwarePixelBuffera14">getWidth</a>();
18900230             mHeight = mBuffer-&gt;<a class="code" href="classOgre_1_1HardwarePixelBuffer.html#Ogre_1_1HardwarePixelBuffera15">getHeight</a>();
19000231             mColourDepth = <a class="code" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile1">Ogre::PixelUtil::getNumElemBits</a>(mBuffer-&gt;<a class="code" href="classOgre_1_1HardwarePixelBuffer.html#Ogre_1_1HardwarePixelBuffera17">getFormat</a>());
19100232         }
19200233
193<a name="l00234"></a><a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea3">00234</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea3">getCustomAttribute</a>( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; name, <span class="keywordtype">void</span> *pData )
19400235         {
19500236             <span class="keywordflow">if</span>(name == <span class="stringliteral">"DDBACKBUFFER"</span>)
19600237             {
19700238                 IDirect3DSurface9 ** pSurf = (IDirect3DSurface9 **)pData;
19800239                 *pSurf = static_cast&lt;D3D9HardwarePixelBuffer*&gt;(mBuffer)-&gt;getSurface();
19900240                 <span class="keywordflow">return</span>;
20000241             }
20100242             <span class="keywordflow">else</span> <span class="keywordflow">if</span>(name == <span class="stringliteral">"HWND"</span>)
20200243             {
20300244                 HWND *pHwnd = (HWND*)pData;
20400245                 *pHwnd = NULL;
20500246                 <span class="keywordflow">return</span>;
20600247             }
20700248             <span class="keywordflow">else</span> <span class="keywordflow">if</span>(name == <span class="stringliteral">"BUFFER"</span>)
20800249             {
20900250                 *static_cast&lt;HardwarePixelBuffer**&gt;(pData) = mBuffer;
21000251                 <span class="keywordflow">return</span>;
21100252             }
21200253         }
21300254
214<a name="l00255"></a><a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea4">00255</a>         <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D9RenderTexture.html#Ogre_1_1D3D9RenderTexturea4">requiresTextureFlipping</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; }
21500256     };
21600257
21700258 }
21800259
21900260 <span class="preprocessor">#endif</span>
220</pre></div><hr>
221<p>
222Copyright &copy; 2000-2005 by The OGRE Team<br />
223<!--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/>
224This 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/>
225                <!--/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#">
226                <Work rdf:about="">
227                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
228        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
229                </Work>
230                <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> -->
231
232Last modified Sun Mar 12 14:37:39 2006
233</p>
234</body>
235</html>
Note: See TracBrowser for help on using the repository browser.