<html> <head> <title>OgreWin32GLSupport.cpp Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="style.css"> </head> <body> <!-- Generated by Doxygen 1.2.16 --> <center> <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">Compound 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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>OgreWin32GLSupport.cpp</h1><a href="OgreWin32GLSupport_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#include "<a class="code" href="OgreException_8h.html">OgreException.h</a>"</font> 00002 <font class="preprocessor">#include "<a class="code" href="OgreLogManager_8h.html">OgreLogManager.h</a>"</font> 00003 <font class="preprocessor">#include "<a class="code" href="OgreStringConverter_8h.html">OgreStringConverter.h</a>"</font> 00004 00005 <font class="preprocessor">#include <algorithm></font> 00006 00007 <font class="preprocessor">#include "<a class="code" href="OgreWin32GLSupport_8h.html">OgreWin32GLSupport.h</a>"</font> 00008 00009 <font class="preprocessor">#include "<a class="code" href="OgreWin32Window_8h.html">OgreWin32Window.h</a>"</font> 00010 00011 <font class="keyword">using</font> <font class="keyword">namespace </font>Ogre; 00012 00013 <font class="keyword">namespace </font>Ogre { <a name="l00014"></a><a class="code" href="namespaceOgre.html#a602">00014</a> <font class="keyword">template</font><<font class="keyword">class</font> C> <font class="keywordtype">void</font> <a class="code" href="namespaceOgre.html#a602">remove_duplicates</a>(C& c) 00015 { 00016 std::sort(c.begin(), c.end()); 00017 <font class="keyword">typename</font> C::iterator p = std::unique(c.begin(), c.end()); 00018 c.erase(p, c.end()); 00019 } 00020 <a name="l00021"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta0">00021</a> <font class="keywordtype">void</font> Win32GLSupport::addConfig() 00022 { 00023 <font class="comment">//TODO: EnumDisplayDevices http://msdn.microsoft.com/library/en-us/gdi/devcons_2303.asp</font> 00024 <font class="comment">/*vector<string> DisplayDevices;</font> 00025 <font class="comment"> DISPLAY_DEVICE DisplayDevice;</font> 00026 <font class="comment"> DisplayDevice.cb = sizeof(DISPLAY_DEVICE);</font> 00027 <font class="comment"> DWORD i=0;</font> 00028 <font class="comment"> while (EnumDisplayDevices(NULL, i++, &DisplayDevice, 0) {</font> 00029 <font class="comment"> DisplayDevices.push_back(DisplayDevice.DeviceName);</font> 00030 <font class="comment"> }*/</font> 00031 00032 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a> optFullScreen; 00033 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a> optVideoMode; 00034 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a> optColourDepth; 00035 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a> optDisplayFrequency; 00036 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a> optVSync; 00037 00038 <font class="comment">// FS setting possiblities</font> 00039 optFullScreen.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a> = <font class="stringliteral">"Full Screen"</font>; 00040 optFullScreen.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(<font class="stringliteral">"Yes"</font>); 00041 optFullScreen.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(<font class="stringliteral">"No"</font>); 00042 optFullScreen.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = <font class="stringliteral">"Yes"</font>; 00043 optFullScreen.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm3">immutable</a> = <font class="keyword">false</font>; 00044 00045 <font class="comment">// Video mode possiblities</font> 00046 DEVMODE DevMode; 00047 DevMode.dmSize = <font class="keyword">sizeof</font>(DEVMODE); 00048 optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a> = <font class="stringliteral">"Video Mode"</font>; 00049 optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm3">immutable</a> = <font class="keyword">false</font>; 00050 <font class="keywordflow">for</font> (DWORD i = 0; EnumDisplaySettings(NULL, i, &DevMode); ++i) 00051 { 00052 <font class="keywordflow">if</font> (DevMode.dmBitsPerPel < 16 || DevMode.dmPelsHeight < 480) 00053 <font class="keywordflow">continue</font>; 00054 <a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporto0">mDevModes</a>.push_back(DevMode); 00055 <font class="keywordtype">char</font> szBuf[16]; 00056 snprintf(szBuf, 16, <font class="stringliteral">"%d x %d"</font>, DevMode.dmPelsWidth, DevMode.dmPelsHeight); 00057 optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(szBuf); 00058 } 00059 <a class="code" href="namespaceOgre.html#a602">remove_duplicates</a>(optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>); 00060 optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.front(); 00061 00062 optColourDepth.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a> = <font class="stringliteral">"Colour Depth"</font>; 00063 optColourDepth.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm3">immutable</a> = <font class="keyword">false</font>; 00064 optColourDepth.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = <font class="stringliteral">""</font>; 00065 00066 optDisplayFrequency.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a> = <font class="stringliteral">"Display Frequency"</font>; 00067 optDisplayFrequency.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm3">immutable</a> = <font class="keyword">false</font>; 00068 optDisplayFrequency.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = <font class="stringliteral">""</font>; 00069 00070 optVSync.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a> = <font class="stringliteral">"VSync"</font>; 00071 optVSync.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm3">immutable</a> = <font class="keyword">false</font>; 00072 optVSync.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(<font class="stringliteral">"No"</font>); 00073 optVSync.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(<font class="stringliteral">"Yes"</font>); 00074 optVSync.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = <font class="stringliteral">"No"</font>; 00075 00076 <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>[optFullScreen.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a>] = optFullScreen; 00077 <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>[optVideoMode.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a>] = optVideoMode; 00078 <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>[optColourDepth.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a>] = optColourDepth; 00079 <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>[optDisplayFrequency.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a>] = optDisplayFrequency; 00080 <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>[optVSync.<a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm0">name</a>] = optVSync; 00081 00082 <a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupportc0">refreshConfig</a>(); 00083 } 00084 <a name="l00085"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupportc0">00085</a> <font class="keywordtype">void</font> Win32GLSupport::refreshConfig() 00086 { 00087 ConfigOptionMap::iterator optVideoMode = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Video Mode"</font>); 00088 ConfigOptionMap::iterator moptColourDepth = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Colour Depth"</font>); 00089 ConfigOptionMap::iterator moptDisplayFrequency = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Display Frequency"</font>); 00090 <font class="keywordflow">if</font>(optVideoMode == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end() || moptColourDepth == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end() || moptDisplayFrequency == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00091 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Can't find mOptions!"</font>, <font class="stringliteral">"Win32GLSupport::refreshConfig"</font>); 00092 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a>* optColourDepth = &moptColourDepth->second; 00093 <a class="code" href="structOgre_1_1__ConfigOption.html">ConfigOption</a>* optDisplayFrequency = &moptDisplayFrequency->second; 00094 00095 <a class="code" href="classOgre_1_1String.html">String</a> val = optVideoMode->second.currentValue; 00096 String::size_type pos = val.find(<font class="charliteral">'x'</font>); 00097 <font class="keywordflow">if</font> (pos == String::npos) 00098 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Invalid Video Mode provided"</font>, <font class="stringliteral">"Win32GLSupport::refreshConfig"</font>); 00099 <font class="keywordtype">int</font> width = atoi(val.substr(0, pos).c_str()); 00100 00101 <font class="keywordflow">for</font>(std::vector<DEVMODE>::const_iterator i = <a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporto0">mDevModes</a>.begin(); i != <a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporto0">mDevModes</a>.end(); ++i) 00102 { 00103 <font class="keywordflow">if</font> (i->dmPelsWidth != width) 00104 <font class="keywordflow">continue</font>; 00105 <font class="keywordtype">char</font> buf[128]; 00106 sprintf(buf, <font class="stringliteral">"%d"</font>, i->dmBitsPerPel); 00107 optColourDepth-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(buf); 00108 sprintf(buf, <font class="stringliteral">"%d"</font>, i->dmDisplayFrequency); 00109 optDisplayFrequency-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.push_back(buf); 00110 } 00111 <a class="code" href="namespaceOgre.html#a602">remove_duplicates</a>(optColourDepth-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>); 00112 <a class="code" href="namespaceOgre.html#a602">remove_duplicates</a>(optDisplayFrequency-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>); 00113 optColourDepth-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = optColourDepth-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.back(); 00114 optDisplayFrequency-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm1">currentValue</a> = optDisplayFrequency-><a class="code" href="structOgre_1_1__ConfigOption.html#Ogre_1_1__ConfigOptionm2">possibleValues</a>.front(); 00115 } 00116 <a name="l00117"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta1">00117</a> <font class="keywordtype">void</font> Win32GLSupport::setConfigOption(<font class="keyword">const</font> <a class="code" href="classOgre_1_1String.html">String</a> &name, <font class="keyword">const</font> <a class="code" href="classOgre_1_1String.html">String</a> &value) 00118 { 00119 ConfigOptionMap::iterator it = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(name); 00120 00121 <font class="comment">// Update</font> 00122 <font class="keywordflow">if</font>(it != <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00123 it->second.currentValue = value; 00124 <font class="keywordflow">else</font> 00125 { 00126 <font class="keywordtype">char</font> msg[128]; 00127 sprintf( msg, <font class="stringliteral">"Option named '%s' does not exist."</font>, name.c_str() ); 00128 <a class="code" href="OgreException_8h.html#a0">Except</a>( Exception::ERR_INVALIDPARAMS, msg, <font class="stringliteral">"Win32GLSupport::setConfigOption"</font> ); 00129 } 00130 00131 <font class="keywordflow">if</font>( name == <font class="stringliteral">"Video Mode"</font> ) 00132 <a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupportc0">refreshConfig</a>(); 00133 00134 <font class="keywordflow">if</font>( name == <font class="stringliteral">"Full Screen"</font> ) 00135 { 00136 it = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find( <font class="stringliteral">"Display Frequency"</font> ); 00137 <font class="keywordflow">if</font>( value == <font class="stringliteral">"No"</font> ) 00138 { 00139 it->second.currentValue = <font class="stringliteral">"N/A"</font>; 00140 it->second.immutable = <font class="keyword">true</font>; 00141 } 00142 <font class="keywordflow">else</font> 00143 { 00144 it->second.currentValue = it->second.possibleValues.front(); 00145 it->second.immutable = <font class="keyword">false</font>; 00146 } 00147 } 00148 } 00149 <a name="l00150"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta2">00150</a> <a class="code" href="classOgre_1_1String.html">String</a> Win32GLSupport::validateConfig() 00151 { 00152 <font class="comment">// TODO, DX9</font> 00153 <font class="keywordflow">return</font> <a class="code" href="classOgre_1_1String.html">String</a>(<font class="stringliteral">""</font>); 00154 } 00155 <a name="l00156"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta3">00156</a> <a class="code" href="classOgre_1_1RenderWindow.html">RenderWindow</a>* Win32GLSupport::createWindow(<font class="keywordtype">bool</font> autoCreateWindow, <a class="code" href="classOgre_1_1GLRenderSystem.html">GLRenderSystem</a>* renderSystem) 00157 { 00158 <font class="keywordflow">if</font> (autoCreateWindow) 00159 { 00160 ConfigOptionMap::iterator opt = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Full Screen"</font>); 00161 <font class="keywordflow">if</font> (opt == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00162 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Can't find full screen options!"</font>, <font class="stringliteral">"Win32GLSupport::createWindow"</font>); 00163 <font class="keywordtype">bool</font> fullscreen = (opt->second.currentValue == <font class="stringliteral">"Yes"</font>); 00164 00165 opt = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Video Mode"</font>); 00166 <font class="keywordflow">if</font> (opt == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00167 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Can't find video mode options!"</font>, <font class="stringliteral">"Win32GLSupport::createWindow"</font>); 00168 <a class="code" href="classOgre_1_1String.html">String</a> val = opt->second.currentValue; 00169 String::size_type pos = val.find(<font class="charliteral">'x'</font>); 00170 <font class="keywordflow">if</font> (pos == String::npos) 00171 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Invalid Video Mode provided"</font>, <font class="stringliteral">"Win32GLSupport::createWindow"</font>); 00172 00173 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> w = StringConverter::parseUnsignedInt(val.substr(0, pos)); 00174 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> h = StringConverter::parseUnsignedInt(val.substr(pos + 1)); 00175 00176 opt = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Colour Depth"</font>); 00177 <font class="keywordflow">if</font> (opt == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00178 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Can't find Colour Depth options!"</font>, <font class="stringliteral">"Win32GLSupport::createWindow"</font>); 00179 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> colourDepth = atoi(opt->second.currentValue); 00180 00181 opt = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"VSync"</font>); 00182 <font class="keywordflow">if</font> (opt == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00183 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Can't find VSync options!"</font>, <font class="stringliteral">"Win32GLSupport::createWindow"</font>); 00184 <font class="keywordtype">bool</font> vsync = (opt->second.currentValue == <font class="stringliteral">"Yes"</font>); 00185 renderSystem-><a class="code" href="classOgre_1_1RenderSystem.html#Ogre_1_1RenderSystema18">setWaitForVerticalBlank</a>(vsync); 00186 00187 <font class="keywordflow">return</font> renderSystem-><a class="code" href="classOgre_1_1GLRenderSystem.html#Ogre_1_1GLRenderSystema12">createRenderWindow</a>(<font class="stringliteral">"OGRE Render Window"</font>, w, h, colourDepth, fullscreen); 00188 } 00189 <font class="keywordflow">else</font> 00190 { 00191 <font class="comment">// XXX What is the else?</font> 00192 <font class="keywordflow">return</font> NULL; 00193 } 00194 } 00195 <a name="l00196"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta4">00196</a> <a class="code" href="classOgre_1_1RenderWindow.html">RenderWindow</a>* Win32GLSupport::newWindow(<font class="keyword">const</font> <a class="code" href="classOgre_1_1String.html">String</a>& name, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> width, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> height, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> colourDepth, 00197 <font class="keywordtype">bool</font> fullScreen, <font class="keywordtype">int</font> left, <font class="keywordtype">int</font> top, <font class="keywordtype">bool</font> depthBuffer, <a class="code" href="classOgre_1_1RenderWindow.html">RenderWindow</a>* parentWindowHandle, 00198 <font class="keywordtype">bool</font> vsync) 00199 { 00200 ConfigOptionMap::iterator opt = <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.find(<font class="stringliteral">"Display Frequency"</font>); 00201 <font class="keywordflow">if</font> (opt == <a class="code" href="classOgre_1_1GLSupport.html#Ogre_1_1Win32GLSupportn0">mOptions</a>.end()) 00202 <a class="code" href="OgreException_8h.html#a0">Except</a>(999, <font class="stringliteral">"Can't find Colour Depth options!"</font>, <font class="stringliteral">"Win32GLSupport::newWindow"</font>); 00203 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> displayFrequency = atoi(opt->second.currentValue); 00204 00205 <a class="code" href="classOgre_1_1Win32Window.html">Win32Window</a>* window = <font class="keyword">new</font> <a class="code" href="classOgre_1_1Win32Window.html">Win32Window</a>(); 00206 window-><a class="code" href="classOgre_1_1Win32Window.html#Ogre_1_1Win32Windowa2">create</a>(name, width, height, colourDepth, fullScreen, left, top, depthBuffer, 00207 parentWindowHandle, vsync, displayFrequency); 00208 <font class="keywordflow">return</font> window; 00209 } 00210 <a name="l00211"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta5">00211</a> <font class="keywordtype">void</font> Win32GLSupport::start() 00212 { 00213 LogManager::getSingleton().logMessage(<font class="stringliteral">"*** Starting Win32GL Subsystem ***"</font>); 00214 } 00215 <a name="l00216"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta6">00216</a> <font class="keywordtype">void</font> Win32GLSupport::stop() 00217 { 00218 LogManager::getSingleton().logMessage(<font class="stringliteral">"*** Stopping Win32GL Subsystem ***"</font>); 00219 } 00220 <a name="l00221"></a><a class="code" href="classOgre_1_1Win32GLSupport.html#Ogre_1_1Win32GLSupporta7">00221</a> <font class="keywordtype">void</font>* Win32GLSupport::getProcAddress(<font class="keyword">const</font> <a class="code" href="classOgre_1_1String.html">String</a>& procname) 00222 { 00223 <font class="keywordflow">return</font> wglGetProcAddress( procname.c_str() ); 00224 } 00225 00226 } </pre></div><p> Copyright © 2002-2003 by The OGRE Team<br /> Last modified Wed Jan 21 00:10:31 2004 </p> </body> </html>