1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreD3D7RenderWindow.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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreD3D7RenderWindow.h</h1><a href="OgreD3D7RenderWindow_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="preprocessor">#ifndef __D3D7RenderWindow_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __D3D7RenderWindow_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="comment">// Precompiler options</span> |
---|
38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgreD3D7Prerequisites_8h.html">OgreD3D7Prerequisites.h</a>"</span> |
---|
39 | 00030 |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreRenderWindow_8h.html">OgreRenderWindow.h</a>"</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreDDDriver_8h.html">OgreDDDriver.h</a>"</span> |
---|
42 | 00033 <span class="preprocessor">#include "<a class="code" href="OgreD3D7DeviceList_8h.html">OgreD3D7DeviceList.h</a>"</span> |
---|
43 | 00034 <span class="preprocessor">#include "<a class="code" href="OgreD3D7Device_8h.html">OgreD3D7Device.h</a>"</span> |
---|
44 | 00035 |
---|
45 | 00036 <span class="keyword">namespace </span>Ogre { |
---|
46 | <a name="l00042"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html">00042</a> <span class="keyword">class </span><a class="code" href="classOgre_1_1D3D7RenderWindow.html">D3D7RenderWindow</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1RenderWindow.html">RenderWindow</a> |
---|
47 | 00043 { |
---|
48 | 00044 <span class="keyword">public</span>: |
---|
49 | 00045 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa0">D3D7RenderWindow</a>(HINSTANCE instance, <a class="code" href="classOgre_1_1DDDriver.html">DDDriver</a> *driver); |
---|
50 | 00046 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa1">~D3D7RenderWindow</a>(); |
---|
51 | 00047 |
---|
52 | 00048 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa2">create</a>(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& name, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height, |
---|
53 | 00049 <span class="keywordtype">bool</span> fullScreen, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a62">NameValuePairList</a> *miscParams); |
---|
54 | 00050 |
---|
55 | 00053 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa3">destroy</a>(<span class="keywordtype">void</span>); |
---|
56 | 00054 |
---|
57 | 00057 <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa4">isActive</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
58 | 00058 |
---|
59 | 00061 <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa5">isClosed</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
60 | 00062 |
---|
61 | 00065 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa6">reposition</a>(<span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top); |
---|
62 | 00066 |
---|
63 | 00069 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa7">resize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height); |
---|
64 | 00070 |
---|
65 | 00073 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa8">swapBuffers</a>(<span class="keywordtype">bool</span> waitForVSync); |
---|
66 | 00074 |
---|
67 | 00077 HWND <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa9">getWindowHandle</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
68 | 00078 |
---|
69 | 00081 HWND <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa10">getParentWindowHandle</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
70 | 00082 |
---|
71 | 00085 <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa11">isUsingDirectDraw</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
72 | 00091 <a class="code" href="classOgre_1_1DDDriver.html">DDDriver</a>* <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa12">getDirectDrawDriver</a>(<span class="keywordtype">void</span>); |
---|
73 | 00092 |
---|
74 | 00098 LPDIRECTDRAWSURFACE7 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa13">getDDFrontBuffer</a>(<span class="keywordtype">void</span>); |
---|
75 | 00099 |
---|
76 | 00103 LPDIRECTDRAWSURFACE7 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa14">getDDBackBuffer</a>(<span class="keywordtype">void</span>); |
---|
77 | 00104 |
---|
78 | 00110 LPDIRECT3DDEVICE7 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa15">getD3DDevice</a>(<span class="keywordtype">void</span>); |
---|
79 | 00111 |
---|
80 | <a name="l00112"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa16">00112</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa16">requiresTextureFlipping</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; } |
---|
81 | 00113 |
---|
82 | 00116 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa17">getCustomAttribute</a>(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& name, <span class="keywordtype">void</span>* pData); |
---|
83 | 00117 |
---|
84 | 00120 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa18">writeContentsToFile</a>(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& filename); |
---|
85 | 00121 <span class="comment">// DirectDraw Methods</span> |
---|
86 | 00122 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa19">createDDSurfaces</a>(<span class="keywordtype">void</span>); |
---|
87 | 00123 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa20">releaseDDSurfaces</a>(<span class="keywordtype">void</span>); |
---|
88 | 00124 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa21">restoreDDSurfaces</a>(<span class="keywordtype">void</span>); |
---|
89 | 00125 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowa22">createDepthBuffer</a>(<span class="keywordtype">void</span>); |
---|
90 | 00126 |
---|
91 | 00127 <span class="keyword">protected</span>: |
---|
92 | <a name="l00128"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp0">00128</a> HINSTANCE <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp0">mInstance</a>; <span class="comment">// Process instance</span> |
---|
93 | <a name="l00129"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp1">00129</a> <a class="code" href="classOgre_1_1DDDriver.html">DDDriver</a> *<a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp1">mDriver</a>; <span class="comment">// D3D9 driver</span> |
---|
94 | 00130 <span class="comment">// Win32-specific data members</span> |
---|
95 | <a name="l00131"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp2">00131</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp2">mIsUsingDirectDraw</a>; |
---|
96 | <a name="l00132"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp3">00132</a> HWND mHWnd; <span class="comment">// Win32 Window handle</span> |
---|
97 | <a name="l00133"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp4">00133</a> HWND <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp4">mParentHWnd</a>; |
---|
98 | <a name="l00134"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp5">00134</a> <span class="keywordtype">bool</span> mActive; <span class="comment">// Is active i.e. visible</span> |
---|
99 | <a name="l00135"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp6">00135</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp6">mReady</a>; <span class="comment">// Is ready i.e. available for update</span> |
---|
100 | <a name="l00136"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp7">00136</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp7">mClosed</a>; |
---|
101 | 00137 |
---|
102 | <a name="l00138"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp8">00138</a> RECT <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp8">rcBlitDest</a>; <span class="comment">// Target for blit operation</span> |
---|
103 | 00139 <span class="comment">// == window client area</span> |
---|
104 | 00140 |
---|
105 | 00141 |
---|
106 | 00142 <span class="keyword">static</span> LRESULT CALLBACK <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowf0">WndProc</a>( |
---|
107 | 00143 HWND hWnd, |
---|
108 | 00144 UINT uMsg, |
---|
109 | 00145 WPARAM wParam, |
---|
110 | 00146 LPARAM lParam); |
---|
111 | 00147 |
---|
112 | 00148 <span class="comment">// ---------------------------------------------------------</span> |
---|
113 | 00149 <span class="comment">// DirectX-specific</span> |
---|
114 | 00150 <span class="comment">// ---------------------------------------------------------</span> |
---|
115 | 00151 |
---|
116 | 00152 <span class="comment">// Pointer to DDDriver encapsulating DirectDraw driver (if DirectX in use)</span> |
---|
117 | <a name="l00153"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp9">00153</a> <a class="code" href="classOgre_1_1DDDriver.html">DDDriver</a>* <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp9">mlpDDDriver</a>; |
---|
118 | 00154 |
---|
119 | 00155 <span class="comment">// Pointers to DX surfaces</span> |
---|
120 | <a name="l00156"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp10">00156</a> LPDIRECTDRAWSURFACE7 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp10">mlpDDSFront</a>; <span class="comment">// Pointer to primary (front) buffer surface</span> |
---|
121 | <a name="l00157"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp11">00157</a> LPDIRECTDRAWSURFACE7 <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp11">mlpDDSBack</a>; <span class="comment">// Pointer to back buffer</span> |
---|
122 | 00158 |
---|
123 | 00159 <span class="comment">// Pointer to the 3D Device specific for this window</span> |
---|
124 | <a name="l00160"></a><a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowp12">00160</a> LPDIRECT3DDEVICE7 mlpD3DDevice; |
---|
125 | 00161 |
---|
126 | 00162 |
---|
127 | 00163 <span class="comment">// Method for dealing with resize / move & 3d library</span> |
---|
128 | 00164 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1D3D7RenderWindow.html#Ogre_1_1D3D7RenderWindowb0">windowMovedOrResized</a>(<span class="keywordtype">void</span>); |
---|
129 | 00165 |
---|
130 | 00166 <span class="comment">// ---------------------------------------------------------</span> |
---|
131 | 00167 <span class="comment">// OpenGL-specific details</span> |
---|
132 | 00168 <span class="comment">// ---------------------------------------------------------</span> |
---|
133 | 00169 |
---|
134 | 00170 <span class="comment">// TODO</span> |
---|
135 | 00171 }; |
---|
136 | 00172 } |
---|
137 | 00173 <span class="preprocessor">#endif</span> |
---|
138 | </pre></div><hr> |
---|
139 | <p> |
---|
140 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
141 | <!--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/> |
---|
142 | This 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/> |
---|
143 | <!--/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#"> |
---|
144 | <Work rdf:about=""> |
---|
145 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
146 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
147 | </Work> |
---|
148 | <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> --> |
---|
149 | |
---|
150 | Last modified Sun Feb 12 12:59:43 2006 |
---|
151 | </p> |
---|
152 | </body> |
---|
153 | </html> |
---|