Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4370 in orxonox.OLD for orxonox/trunk/src/lib/graphics


Ignore:
Timestamp:
May 28, 2005, 4:20:02 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: objModel's materials should now automatically load textures

Location:
orxonox/trunk/src/lib/graphics
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/importer/material.cc

    r4357 r4370  
    282282   \param pathName The Path to add.
    283283*/
    284 void Material::addTexturePath(char* pathName)
     284void Material::addTexturePath(const char* pathName)
    285285{
    286286  ResourceManager::getInstance()->addImageDir(pathName);
  • orxonox/trunk/src/lib/graphics/importer/material.h

    r4136 r4370  
    4848
    4949 
    50   void addTexturePath(char* pathName);
     50  static void addTexturePath(const char* pathName);
    5151 // MAPPING //
    5252  void setDiffuseMap(const char* dMap);
  • orxonox/trunk/src/lib/graphics/importer/objModel.cc

    r4118 r4370  
    7575      strncpy(this->objPath, fileName, len);
    7676      this->objPath[len] = '\0';
     77      Material::addTexturePath(this->objPath);
    7778      PRINTF(1)("Resolved file %s to Path %s.\n", fileName, this->objPath);
    7879    }
  • orxonox/trunk/src/lib/graphics/importer/texture.cc

    r4357 r4370  
    4444    glDeleteTextures(1, &this->texture);
    4545}
    46 
    47 /**
    48    \brief a Simple function that switches two char values
    49    \param a The first value
    50    \param b The second value
    51 */
    52 void Texture::swap (unsigned char &a, unsigned char &b)
    53 {
    54   unsigned char temp;
    55   temp = a;
    56   a    = b;
    57   b    = temp;
    58 }
    59 
    6046
    6147/**
  • orxonox/trunk/src/lib/graphics/importer/texture.h

    r4357 r4370  
    2323  GLuint texture;   //!< The Texture-ID of opengl from this Texture.
    2424  char* searchTextureInPaths(const char* texName) const;
    25   void swap(unsigned char &a, unsigned char &b);
    2625
    2726  bool bAlpha;           //!< if the texture has an alpha channel.
  • orxonox/trunk/src/lib/graphics/particles/particle_system.cc

    r4357 r4370  
    321321    case PARTICLE_SPRITE:
    322322      glMatrixMode(GL_MODELVIEW);
    323       //      glDisable(GL_DEPTH_TEST);
     323      glDisable(GL_DEPTH_TEST);
    324324
    325325      material->select();
Note: See TracChangeset for help on using the changeset viewer.