Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6328 in orxonox.OLD for branches/network/src/world_entities/skybox.h


Ignore:
Timestamp:
Dec 28, 2005, 2:41:52 AM (18 years ago)
Author:
rennerc
Message:

fixed some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/skybox.h

    r6273 r6328  
    3535  void setSize(float size);
    3636  /** assumes jpg as input-format */
    37   void setTexture(const char* name) { strncpy(textureName, name, 1024); this->setTextureAndType (name, "jpg"); };
     37  void setTexture(const char* name) { if (textureName) delete[] textureName; textureName = new char[strlen(name)+1]; strcpy(textureName, name); this->setTextureAndType (name, "jpg"); };
    3838
    3939  void setTextureAndType(const char* name, const char* extension);
     
    5151  Material**      material;          //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
    5252  float           size;              //!< Size of the SkyBox. This should match the frustum maximum range.
    53   char            textureName[1024]; //!< Name of the Texture
     53  char*           textureName;      //!< Name of the Texture
    5454
    5555};
Note: See TracChangeset for help on using the changeset viewer.