Changeset 5857 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Dec 1, 2005, 7:38:14 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r5819 r5857 31 31 32 32 #include "globals.h" 33 #include "texture.h" 33 34 34 35 #ifdef __WIN32__ 35 36 #include "class_list.h" 36 #include "texture.h"37 37 #include "list.h" 38 38 #include "model.h" … … 131 131 const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0"); 132 132 if (strchr(textures, '1') || !strcasecmp(textures, "true")) 133 this->texturesEnabled = true;133 Texture::setTextureEnableState( true); 134 134 else 135 this->texturesEnabled = false;135 Texture::setTextureEnableState(false); 136 136 137 137 // searching for a usefull resolution … … 365 365 366 366 /** 367 * if Textures should be enabled368 */369 bool GraphicsEngine::texturesEnabled = true;370 371 /**372 367 * 373 368 * @param show if The mouse-cursor should be visible -
trunk/src/lib/graphics/graphics_engine.h
r5366 r5857 83 83 84 84 public: 85 static bool texturesEnabled; //!< if textures should be enabled (globally)86 87 85 88 86 private: -
trunk/src/lib/graphics/importer/texture.h
r5856 r5857 38 38 const SDL_Surface* const getStoredImage() { return this->image; }; 39 39 40 static void setTextureEnableState(bool texturesEnabled); 41 /** @returns true if Textures are enabled */ 42 inline static bool getTextureEnableState() { return Texture::texturesEnabled; }; 43 40 44 protected: 41 45 bool prepareSurface(SDL_Surface* input); … … 45 49 46 50 private: 47 GLuint texture; //!< The Texture-ID of opengl from this Texture. 48 bool bAlpha; //!< if the texture has an alpha channel. 49 SDL_Surface* image; //!< The SDL_Surfce that stores the Texture on it. 51 GLuint texture; //!< The Texture-ID of opengl from this Texture. 52 bool bAlpha; //!< if the texture has an alpha channel. 53 SDL_Surface* image; //!< The SDL_Surfce that stores the Texture on it. 54 55 static bool texturesEnabled; //!< If the Textures are enabled. 50 56 }; 51 57
Note: See TracChangeset
for help on using the changeset viewer.