Changeset 6753 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Jan 26, 2006, 1:08:23 AM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/Makefile.am
r5463 r6753 11 11 text_engine/text_engine.cc \ 12 12 text_engine/text.cc \ 13 text_engine/font.cc 13 text_engine/font.cc \ 14 effects/graphics_effect.cc \ 15 effects/fog_effect.cc 14 16 15 17 noinst_HEADERS = graphics_engine.h \ … … 20 22 text_engine/text_engine.h \ 21 23 text_engine/text.h \ 22 text_engine/font.h 24 text_engine/font.h \ 25 effects/graphics_effect.h \ 26 effects/fog_effect.h 23 27 24 28 -
trunk/src/lib/graphics/graphics_engine.cc
r6634 r6753 35 35 #include "globals.h" 36 36 #include "texture.h" 37 38 #include "effects/graphics_effect.h" 37 39 38 40 #include "shell_command.h" … … 653 655 break; 654 656 } 655 656 } 657 } 658 659 660 /** 661 * loads a GraphicsEffect into the engine 662 * @param effect the GraphicsEffect to add 663 */ 664 bool GraphicsEngine::loadGraphicsEffect(GraphicsEffect* effect) 665 { 666 list<GraphicsEffect*>::iterator it; 667 for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++) 668 if( (*it) == effect) 669 return false; 670 671 this->graphicsEffects.push_back(effect); 672 673 return true; 674 } 675 676 677 /** 678 * unloads a GraphicsEffect from the engine 679 * @param effect the GraphicsEffect to remove 680 */ 681 bool GraphicsEngine::unloadGraphicsEffect(GraphicsEffect* effect) 682 { 683 list<GraphicsEffect*>::iterator it; 684 for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++) 685 { 686 if( (*it) == effect) 687 { 688 this->graphicsEffects.erase(it); 689 return true; 690 } 691 } 692 693 return false; 694 } 695 -
trunk/src/lib/graphics/graphics_engine.h
r6522 r6753 22 22 class SubString; 23 23 class WorldEntity; 24 class GraphicsEffect; 24 25 25 26 //! class to handle graphics … … 82 83 void process(const Event &event); 83 84 85 bool loadGraphicsEffect(GraphicsEffect* effect); 86 bool unloadGraphicsEffect(GraphicsEffect* effect); 87 88 89 84 90 private: 85 91 GraphicsEngine(); … … 91 97 92 98 private: 93 static GraphicsEngine* singletonRef; //!< Pointer to the only instance of this Class94 bool isInit; //!< if the GraphicsEngine is initialized.99 static GraphicsEngine* singletonRef; //!< Pointer to the only instance of this Class 100 bool isInit; //!< if the GraphicsEngine is initialized. 95 101 96 102 // state. 97 SDL_Surface* screen; //!< the screen we draw to98 int resolutionX; //!< the X-resoultion of the screen99 int resolutionY; //!< the Y-resolution of the screen100 int bitsPerPixel; //!< the bits per pixels of the screen101 Uint32 fullscreenFlag; //!< if we are in fullscreen mode102 Uint32 videoFlags; //!< flags for video103 SDL_Rect** videoModes; //!< list of resolutions103 SDL_Surface* screen; //!< the screen we draw to 104 int resolutionX; //!< the X-resoultion of the screen 105 int resolutionY; //!< the Y-resolution of the screen 106 int bitsPerPixel; //!< the bits per pixels of the screen 107 Uint32 fullscreenFlag; //!< if we are in fullscreen mode 108 Uint32 videoFlags; //!< flags for video 109 SDL_Rect** videoModes; //!< list of resolutions 104 110 105 bool fogEnabled; //!< If Fog should be enabled.106 bool shadowsEnabled; //!< If Shadows should be enabled.107 bool particlesEnabled; //!< If particles should be enabled.108 int particlesValue; //!< How many particles109 int textureQuality; //!< the quality of Textures110 int filteringMethod; //!< The filtering Method of textures.111 int modelQuality; //!< The quality of the Models loaded.112 int antialiasingDepth; //!< the Depth of the AntiAlias-Filter.111 bool fogEnabled; //!< If Fog should be enabled. 112 bool shadowsEnabled; //!< If Shadows should be enabled. 113 bool particlesEnabled; //!< If particles should be enabled. 114 int particlesValue; //!< How many particles 115 int textureQuality; //!< the quality of Textures 116 int filteringMethod; //!< The filtering Method of textures. 117 int modelQuality; //!< The quality of the Models loaded. 118 int antialiasingDepth; //!< the Depth of the AntiAlias-Filter. 113 119 114 120 // HARDWARE-Settings: 115 char* hwRenderer; //!< HW-renderer-string116 char* hwVendor; //!< HW-vendor-string117 char* hwVersion; //!< HW-version-string118 SubString* hwExtensions; //!< All suported Extensions.121 char* hwRenderer; //!< HW-renderer-string 122 char* hwVendor; //!< HW-vendor-string 123 char* hwVersion; //!< HW-version-string 124 SubString* hwExtensions; //!< All suported Extensions. 119 125 120 126 // FPS-related 121 bool bDisplayFPS; //!< is true if the fps should be displayed 122 float currentFPS; //!< the current frame rate: frames per seconds 123 float maxFPS; //!< maximal frame rate we ever got since start of the game 124 float minFPS; //!< minimal frame rate we ever got since start. 127 bool bDisplayFPS; //!< is true if the fps should be displayed 128 float currentFPS; //!< the current frame rate: frames per seconds 129 float maxFPS; //!< maximal frame rate we ever got since start of the game 130 float minFPS; //!< minimal frame rate we ever got since start. 131 132 std::list<GraphicsEffect*> graphicsEffects; //!< list of graphics effects 133 125 134 126 135 #ifndef NO_TEXT
Note: See TracChangeset
for help on using the changeset viewer.