Changeset 4817 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Jul 7, 2005, 5:12:45 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r4784 r4817 18 18 #include "graphics_engine.h" 19 19 #include "resource_manager.h" 20 #include "event_handler.h" 20 21 21 22 #include "debug.h" … … 46 47 47 48 // this->listModes(); 49 50 // subscribe the resolutionChanged-event 51 EventHandler::getInstance()->subscribe(this, ES_GAME, EV_VIDEO_RESIZE); 52 48 53 } 49 54 … … 59 64 { 60 65 // delete what has to be deleted here 66 EventHandler::getInstance()->unsubscribe(this); 61 67 } 62 68 … … 389 395 390 396 397 /** 398 \brief processes the events for orxonox main class 399 \param the event to handle 400 */ 401 void GraphicsEngine::process(const Event &event) 402 { 403 switch (event.type) 404 { 405 case EV_VIDEO_RESIZE: 406 this->resolutionChanged(event.resize); 407 break; 408 } 409 410 } 411 -
orxonox/trunk/src/lib/graphics/graphics_engine.h
r4784 r4817 5 5 6 6 handles graphical SDL-initialisation, textures, resolutions, and so on 7 */7 */ 8 8 9 9 #ifndef _GRAPHICS_ENGINE_H 10 10 #define _GRAPHICS_ENGINE_H 11 11 12 #include " base_object.h"12 #include "event_listener.h" 13 13 14 14 #include "sdlincl.h" … … 23 23 handles graphical SDL-initialisation, textures, resolutions, and so on 24 24 */ 25 class GraphicsEngine : public BaseObject25 class GraphicsEngine : public EventListener 26 26 { 27 27 public: … … 64 64 static void swapBuffers() { SDL_GL_SwapBuffers(); }; 65 65 66 void process(const Event &event); 66 67 67 68 private:
Note: See TracChangeset
for help on using the changeset viewer.