1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreDDDriver.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>OgreDDDriver.h</h1><a href="OgreDDDriver_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 __DDDRIVER_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __DDDRIVER_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="comment">// Declaration</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreString_8h.html">OgreString.h</a>"</span> |
---|
42 | 00033 |
---|
43 | 00034 <span class="keyword">namespace </span>Ogre { |
---|
44 | 00035 |
---|
45 | 00036 <span class="keyword">class </span>D3DDeviceList; |
---|
46 | 00037 <span class="keyword">class </span>DDVideoModeList; |
---|
47 | 00038 <span class="keyword">class </span>DDVideoMode; |
---|
48 | 00039 <span class="keyword">class </span><a class="code" href="namespaceOgre.html#a567">D3DDevice</a>; |
---|
49 | 00040 |
---|
50 | 00041 |
---|
51 | <a name="l00045"></a><a class="code" href="classOgre_1_1DDDriver.html">00045</a> <span class="keyword">class </span><a class="code" href="OgreD3D7Prerequisites_8h.html#a5">_OgreD3DExport</a> DDDriver |
---|
52 | 00046 { |
---|
53 | 00047 <span class="keyword">private</span>: |
---|
54 | 00048 |
---|
55 | <a name="l00049"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr0">00049</a> <a class="code" href="namespaceOgre.html#a426">String</a> mDriverName; |
---|
56 | <a name="l00050"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr1">00050</a> <a class="code" href="namespaceOgre.html#a426">String</a> mDriverDesc; |
---|
57 | <a name="l00051"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr2">00051</a> GUID mGuid; <span class="comment">// Note - copy of GUID, not pointer to</span> |
---|
58 | <a name="l00052"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr3">00052</a> <span class="keywordtype">bool</span> mPrimaryDisplay; |
---|
59 | 00053 |
---|
60 | <a name="l00054"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr4">00054</a> LPDIRECTDRAW7 lpDD7; <span class="comment">// pointer to IDirectDraw7 interface</span> |
---|
61 | <a name="l00055"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr5">00055</a> LPDIRECT3D7 lpD3D; <span class="comment">// pointer to IDirect3D7 interface (if required)</span> |
---|
62 | <a name="l00056"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr6">00056</a> <a class="code" href="classOgre_1_1D3DDeviceList.html">D3DDeviceList</a>* mDeviceList; <span class="comment">// List of Direct3D devices</span> |
---|
63 | <a name="l00057"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr7">00057</a> <a class="code" href="classOgre_1_1DDVideoModeList.html">DDVideoModeList</a>* mVideoModeList; <span class="comment">// List of video modes</span> |
---|
64 | <a name="l00058"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr8">00058</a> <a class="code" href="classOgre_1_1D3DDevice.html">D3DDevice</a>* active3DDevice; |
---|
65 | <a name="l00059"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr9">00059</a> <a class="code" href="classOgre_1_1DDVideoMode.html">DDVideoMode</a>* activeVideoMode; |
---|
66 | <a name="l00060"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr10">00060</a> HWND activeHWnd; |
---|
67 | 00061 |
---|
68 | <a name="l00062"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr11">00062</a> DDCAPS mSWCaps; <span class="comment">// Software capabilities</span> |
---|
69 | <a name="l00063"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr12">00063</a> DDCAPS mHWCaps; <span class="comment">// Hardware capabilities</span> |
---|
70 | 00064 <span class="keywordtype">void</span> logCaps(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
71 | 00065 |
---|
72 | <a name="l00066"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr13">00066</a> LPDIRECTDRAWSURFACE7 lpDDSPrimary; <span class="comment">// Pointer to primary surface</span> |
---|
73 | <a name="l00067"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr14">00067</a> LPDIRECTDRAWSURFACE7 lpDDSBack; <span class="comment">// Pointer to back buffer</span> |
---|
74 | 00068 |
---|
75 | <a name="l00069"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr15">00069</a> <span class="keywordtype">bool</span> runningFullScreen; |
---|
76 | <a name="l00070"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr16">00070</a> <span class="keywordtype">bool</span> using3DMode; |
---|
77 | 00071 |
---|
78 | <a name="l00072"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr17">00072</a> RECT rcViewport; <span class="comment">//Only used for windowed mode</span> |
---|
79 | <a name="l00073"></a><a class="code" href="classOgre_1_1DDDriver.html#Ogre_1_1DDDriverr18">00073</a> LPDIRECTDRAWCLIPPER lpDDClipper; |
---|
80 | 00074 |
---|
81 | 00075 <span class="comment">// Private accessor functions</span> |
---|
82 | 00076 |
---|
83 | 00077 <span class="keywordtype">void</span> RestoreSurfaces(<span class="keywordtype">void</span>); |
---|
84 | 00078 |
---|
85 | 00079 |
---|
86 | 00080 |
---|
87 | 00081 <span class="keyword">public</span>: |
---|
88 | 00082 <span class="comment">// Constructors</span> |
---|
89 | 00083 DDDriver(); <span class="comment">// Default</span> |
---|
90 | 00084 DDDriver(<span class="keyword">const</span> DDDriver &ob); <span class="comment">// Copy</span> |
---|
91 | 00085 DDDriver(GUID FAR *lpGuid, <span class="comment">// Create from enum</span> |
---|
92 | 00086 LPSTR lpDriverDescription, |
---|
93 | 00087 LPSTR lpDriverName); |
---|
94 | 00088 <span class="comment">// Destructor</span> |
---|
95 | 00089 ~DDDriver(); |
---|
96 | 00090 |
---|
97 | 00114 <span class="keywordtype">void</span> createWindowSurfaces(HWND hWnd, <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">int</span> colourDepth, <span class="keywordtype">bool</span> fullScreen, |
---|
98 | 00115 LPDIRECTDRAWSURFACE7 *front, LPDIRECTDRAWSURFACE7 *back); |
---|
99 | 00116 |
---|
100 | 00117 <span class="keywordtype">void</span> Cleanup(<span class="keywordtype">void</span>); |
---|
101 | 00118 <span class="keywordtype">void</span> CheckWindow(<span class="keywordtype">void</span>); |
---|
102 | 00119 |
---|
103 | 00120 <span class="comment">// Overloaded operator =</span> |
---|
104 | 00121 DDDriver operator=(<span class="keyword">const</span> DDDriver &orig); |
---|
105 | 00122 |
---|
106 | 00123 <span class="comment">// Information accessors</span> |
---|
107 | 00124 <a class="code" href="namespaceOgre.html#a426">String</a> DriverName(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
108 | 00125 <a class="code" href="namespaceOgre.html#a426">String</a> DriverDescription(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
109 | 00126 LPDIRECTDRAW7 directDraw(); <span class="comment">// Gets lpDD7 (instantiates if required)</span> |
---|
110 | 00127 |
---|
111 | 00128 <a class="code" href="classOgre_1_1D3DDeviceList.html">D3DDeviceList</a>* get3DDeviceList(<span class="keywordtype">void</span>); |
---|
112 | 00129 <a class="code" href="classOgre_1_1DDVideoModeList.html">DDVideoModeList</a>* getVideoModeList(<span class="keywordtype">void</span>); |
---|
113 | 00130 <a class="code" href="classOgre_1_1DDVideoMode.html">DDVideoMode</a>* getActiveVideoMode(<span class="keywordtype">void</span>); |
---|
114 | 00131 |
---|
115 | 00132 <span class="comment">// Retrieval of other objects</span> |
---|
116 | 00133 <a class="code" href="classOgre_1_1D3DDevice.html">D3DDevice</a>* get3DDevice(<span class="keywordtype">void</span>); |
---|
117 | 00134 |
---|
118 | 00135 <span class="keywordtype">void</span> OutputText(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">char</span>* text); |
---|
119 | 00136 <span class="keywordtype">void</span> FlipBuffers(<span class="keywordtype">void</span>); |
---|
120 | 00137 <span class="keywordtype">bool</span> RunningFullScreen(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
121 | 00138 RECT ViewportRect(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
122 | 00139 |
---|
123 | 00140 <span class="comment">// Capabilities</span> |
---|
124 | 00141 <span class="keywordtype">bool</span> Has3DAcceleration(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
125 | 00142 <span class="keywordtype">bool</span> CanRenderWindowed(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
126 | 00143 |
---|
127 | 00144 <span class="comment">// Generalised info</span> |
---|
128 | 00145 <span class="keywordtype">void</span> GetDisplayDetails(<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">int</span>& colourDepth); |
---|
129 | 00146 }; |
---|
130 | 00147 } |
---|
131 | 00148 |
---|
132 | 00149 <span class="preprocessor">#endif</span> |
---|
133 | </pre></div><hr> |
---|
134 | <p> |
---|
135 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
136 | <!--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/> |
---|
137 | 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/> |
---|
138 | <!--/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#"> |
---|
139 | <Work rdf:about=""> |
---|
140 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
141 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
142 | </Work> |
---|
143 | <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> --> |
---|
144 | |
---|
145 | Last modified Sun Feb 12 12:59:44 2006 |
---|
146 | </p> |
---|
147 | </body> |
---|
148 | </html> |
---|