Changeset 3327 for code/trunk/src/orxonox/gamestates/GSGraphics.cc
- Timestamp:
- Jul 19, 2009, 5:31:02 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core4 merged: 3269,3271-3275,3278,3285,3290-3294,3310
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r3280 r3327 38 38 #include <OgreRenderWindow.h> 39 39 40 #include " core/ConfigValueIncludes.h"40 #include "util/Convert.h" 41 41 #include "core/Clock.h" 42 #include "core/CommandExecutor.h" 42 43 #include "core/ConsoleCommand.h" 43 44 #include "core/Core.h" 44 #include "core/CoreIncludes.h"45 45 #include "core/Game.h" 46 46 #include "core/GameMode.h" 47 47 #include "core/input/InputManager.h" 48 48 #include "core/input/KeyBinder.h" 49 #include "core/input/ SimpleInputState.h"49 #include "core/input/InputState.h" 50 50 #include "core/Loader.h" 51 51 #include "core/XMLFile.h" … … 70 70 , debugOverlay_(0) 71 71 { 72 RegisterRootObject(GSGraphics);73 72 } 74 73 75 74 GSGraphics::~GSGraphics() 76 {77 }78 79 /**80 @brief81 this function does nothing82 83 Indeed. Here goes nothing.84 */85 void GSGraphics::setConfigValues()86 75 { 87 76 } … … 106 95 GameMode::setShowsGraphics(true); 107 96 108 setConfigValues();109 110 97 // Load OGRE including the render window 111 98 this->graphicsManager_ = new GraphicsManager(); … … 122 109 123 110 // Calls the InputManager which sets up the input devices. 124 inputManager_ = new InputManager(); 125 inputManager_->initialise(windowHnd, renderWindow->getWidth(), renderWindow->getHeight(), true); 111 inputManager_ = new InputManager(windowHnd); 126 112 127 113 // load master key bindings 128 masterInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("master", true);114 masterInputState_ = InputManager::getInstance().createInputState("master", true); 129 115 masterKeyBinder_ = new KeyBinder(); 130 116 masterKeyBinder_->loadBindings("masterKeybindings.ini"); … … 136 122 // Load the InGameConsole 137 123 console_ = new InGameConsole(); 138 console_->initialise( renderWindow->getWidth(), renderWindow->getHeight());124 console_->initialise(); 139 125 140 126 // load the CEGUI interface … … 149 135 150 136 // enable master input 151 InputManager::getInstance(). requestEnterState("master");137 InputManager::getInstance().enterState("master"); 152 138 } 153 139 … … 169 155 170 156 masterInputState_->setHandler(0); 171 InputManager::getInstance(). requestDestroyState("master");157 InputManager::getInstance().destroyState("master"); 172 158 delete this->masterKeyBinder_; 173 159 … … 232 218 this->graphicsManager_->update(time); 233 219 } 234 235 /**236 @brief237 Window has resized.238 @param rw239 The render window it occured in240 @note241 GraphicsManager has a render window stored itself. This is the same242 as rw. But we have to be careful when using multiple render windows!243 */244 void GSGraphics::windowResized(unsigned int newWidth, unsigned int newHeight)245 {246 // OIS needs this under linux even if we only use relative input measurement.247 if (this->inputManager_)248 this->inputManager_->setWindowExtents(newWidth, newHeight);249 }250 251 /**252 @brief253 Window focus has changed.254 @param rw255 The render window it occured in256 */257 void GSGraphics::windowFocusChanged()258 {259 // instruct InputManager to clear the buffers (core library so we cannot use the interface)260 if (this->inputManager_)261 this->inputManager_->clearBuffers();262 }263 264 220 }
Note: See TracChangeset
for help on using the changeset viewer.