Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2006, 2:56:50 AM (18 years ago)
Author:
bensch
Message:

trunk: new ImageLoading algo

File:
1 edited

Legend:

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

    r7221 r8297  
    8686      this->textures[i] = loadTexToGL(this->images[i]);
    8787  }
     88  return true;
    8889}
    8990
     
    117118  }
    118119  return retVal;
     120}
     121
     122bool TextureSequence::loadImageSeries(const std::string& imagePrefix, unsigned int from, unsigned int to, const std::string& extension)
     123{
     124  unsigned int index = 0;
     125  unsigned int frameSize = 0;
     126  // search for the special character # in the LoadParam
     127  if ((index = imagePrefix.find("_#")) != std::string::npos)
     128  {
     129    std::string _imagePrefix = imagePrefix;
     130    index++; // start at #
     131    while(imagePrefix[index+frameSize] == '#')
     132    {
     133      _imagePrefix[index+frameSize] = '0';
     134      frameSize++;
     135    }
     136
     137    PRINTF(4)("Found %d '#'s in %s... searching for LOD's\n", frameSize, imagePrefix.c_str());
     138    char tmpString[32];
     139    for (unsigned int i = from; i < to; i++)
     140    {
     141      sprintf(tmpString, "%d", i);
     142      _imagePrefix.replace(index+frameSize -strlen(tmpString), index+frameSize, tmpString);
     143      printf("TEST STRING %s\n", _imagePrefix.c_str());
     144    }
     145    return true;
     146  }
     147  return false;
    119148}
    120149
Note: See TracChangeset for help on using the changeset viewer.