Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7216 in orxonox.OLD for branches/std/src/lib/graphics/effects


Ignore:
Timestamp:
Mar 12, 2006, 8:54:30 AM (19 years ago)
Author:
bensch
Message:

orxonox/std:: compile and run again, with many more std::strings….

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  
    126126 * @param mode the mode character
    127127 */
    128 GLint FogEffect::charToFogMode(const char* mode)
     128GLint FogEffect::stringToFogMode(const std::string& mode)
    129129{
    130   if( !strcmp( "GL_LINEAR", mode))
     130  if(mode == "GL_LINEAR")
    131131    return GL_LINEAR;
    132   else if( !strcmp("GL_EXP", mode))
     132  else if(mode == "GL_EXP")
    133133    return GL_EXP;
    134   else if(!strcmp("GL_EXP2", mode) )
     134  else if(mode == "GL_EXP2" )
    135135    return GL_EXP2;
    136136  else
  • branches/std/src/lib/graphics/effects/fog_effect.h

    r7107 r7216  
    2626    virtual bool deactivate();
    2727
    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); }
    2929    inline void setFogDensity(float density) { this->fogDensity = density; }
    3030    inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; }
     
    3333
    3434  private:
    35     GLint charToFogMode(const char* mode);
     35    GLint stringToFogMode(const std::string& mode);
    3636
    3737
  • branches/std/src/lib/graphics/effects/lense_flare.cc

    r7193 r7216  
    147147 *  7th: Texture of the third burst
    148148 */
    149 void LenseFlare::addFlare(const char* textureName)
     149void LenseFlare::addFlare(const std::string& textureName)
    150150{
    151151  if( this->flares.size() > LF_MAX_FLARES)
     
    159159  bb->setSize(50, 50);
    160160  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());
    162162
    163163  // the first flare belongs to the light source
     
    167167    bb->setVisibility(true);
    168168  }
    169   PRINTF(0)("Finished adding\n", textureName);
     169  PRINTF(4)("Finished adding\n");
    170170}
    171171
  • branches/std/src/lib/graphics/effects/lense_flare.h

    r7015 r7216  
    3939    virtual void tick(float dt);
    4040
    41     void addFlare(const char* textureName);
     41    void addFlare(const std::string& textureName);
    4242
    4343
Note: See TracChangeset for help on using the changeset viewer.