Changeset 919 for code/branches/network/src/orxonox/GraphicsEngine.cc
- Timestamp:
- Mar 24, 2008, 1:12:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/GraphicsEngine.cc
r790 r919 35 35 #include <OgreConfigFile.h> 36 36 #include <OgreTextureManager.h> 37 #include <OgreRenderWindow.h> 37 38 38 39 #include "core/Debug.h" … … 49 50 this->configPath_ = ""; 50 51 this->dataPath_ = ""; 51 scene_ = NULL; 52 this->root_ = 0; 53 this->scene_ = 0; 54 this->renderWindow_ = 0; 52 55 } 53 56 … … 98 101 { 99 102 root_->initialise(true, "OrxonoxV2"); 103 this->renderWindow_ = root_->getAutoCreatedWindow(); 100 104 TextureManager::getSingleton().setDefaultNumMipmaps(5); 101 105 ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); … … 131 135 } 132 136 137 /** 138 Returns the window handle of the render window. 139 At least the InputHandler uses this to create the OIS::InputManager 140 @return The window handle of the render window 141 */ 142 size_t GraphicsEngine::getWindowHandle() 143 { 144 if (this->renderWindow_) 145 { 146 Ogre::RenderWindow *renderWindow = this->root_->getAutoCreatedWindow(); 147 size_t windowHnd = 0; 148 renderWindow->getCustomAttribute("WINDOW", &windowHnd); 149 return windowHnd; 150 } 151 else 152 return 0; 153 } 154 155 /** 156 Get the width of the current render window 157 @return The width of the current render window 158 */ 159 int GraphicsEngine::getWindowWidth() const 160 { 161 if (this->renderWindow_) 162 { 163 return this->renderWindow_->getWidth(); 164 } 165 else 166 return 0; 167 } 168 169 /** 170 Get the height of the current render window 171 @return The height of the current render window 172 */ 173 int GraphicsEngine::getWindowHeight() const 174 { 175 if (this->renderWindow_) 176 { 177 return this->renderWindow_->getHeight(); 178 } 179 else 180 return 0; 181 } 133 182 134 183 }
Note: See TracChangeset
for help on using the changeset viewer.