Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7221 in orxonox.OLD for trunk/src/lib/graphics/effects


Ignore:
Timestamp:
Mar 15, 2006, 3:10:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

Location:
trunk/src/lib/graphics/effects
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/effects/fog_effect.cc

    r7193 r7221  
    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
  • trunk/src/lib/graphics/effects/fog_effect.h

    r7107 r7221  
    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
  • trunk/src/lib/graphics/effects/lense_flare.cc

    r7193 r7221  
    131131 * @param mode the mode character
    132132 */
    133 GLint LenseFlare::charToFogMode(const char* mode)
     133GLint LenseFlare::stringToFogMode(const std::string& mode)
    134134{}
    135135
     
    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
  • trunk/src/lib/graphics/effects/lense_flare.h

    r7015 r7221  
    3939    virtual void tick(float dt);
    4040
    41     void addFlare(const char* textureName);
     41    void addFlare(const std::string& textureName);
    4242
    4343
    4444  private:
    45     GLint charToFogMode(const char* mode);
     45    GLint stringToFogMode(const std::string& mode);
    4646    void setSourceVisibility(bool visibility) ;
    4747
Note: See TracChangeset for help on using the changeset viewer.