Changeset 7216 in orxonox.OLD for branches/std/src/lib/graphics/effects
- Timestamp:
- Mar 12, 2006, 8:54:30 AM (19 years ago)
- Location:
- branches/std/src/lib/graphics/effects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/graphics/effects/fog_effect.cc
r7193 r7216 126 126 * @param mode the mode character 127 127 */ 128 GLint FogEffect:: charToFogMode(const char*mode)128 GLint FogEffect::stringToFogMode(const std::string& mode) 129 129 { 130 if( !strcmp( "GL_LINEAR", mode))130 if(mode == "GL_LINEAR") 131 131 return GL_LINEAR; 132 else if( !strcmp("GL_EXP", mode))132 else if(mode == "GL_EXP") 133 133 return GL_EXP; 134 else if( !strcmp("GL_EXP2", mode))134 else if(mode == "GL_EXP2" ) 135 135 return GL_EXP2; 136 136 else -
branches/std/src/lib/graphics/effects/fog_effect.h
r7107 r7216 26 26 virtual bool deactivate(); 27 27 28 inline void setFogMode(const char* mode) { this->fogMode = this->charToFogMode(mode); }28 inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } 29 29 inline void setFogDensity(float density) { this->fogDensity = density; } 30 30 inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; } … … 33 33 34 34 private: 35 GLint charToFogMode(const char*mode);35 GLint stringToFogMode(const std::string& mode); 36 36 37 37 -
branches/std/src/lib/graphics/effects/lense_flare.cc
r7193 r7216 147 147 * 7th: Texture of the third burst 148 148 */ 149 void LenseFlare::addFlare(const char*textureName)149 void LenseFlare::addFlare(const std::string& textureName) 150 150 { 151 151 if( this->flares.size() > LF_MAX_FLARES) … … 159 159 bb->setSize(50, 50); 160 160 this->flares.push_back(bb); 161 PRINTF( 0)("Added a Lenseflare Billboard with texture %s\n", textureName);161 PRINTF(4)("Added a Lenseflare Billboard with texture %s\n", textureName.c_str()); 162 162 163 163 // the first flare belongs to the light source … … 167 167 bb->setVisibility(true); 168 168 } 169 PRINTF( 0)("Finished adding\n", textureName);169 PRINTF(4)("Finished adding\n"); 170 170 } 171 171 -
branches/std/src/lib/graphics/effects/lense_flare.h
r7015 r7216 39 39 virtual void tick(float dt); 40 40 41 void addFlare(const char*textureName);41 void addFlare(const std::string& textureName); 42 42 43 43
Note: See TracChangeset
for help on using the changeset viewer.