Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5324 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 8, 2005, 6:52:31 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better algorithm for loading the Shader through the ResourceManager
if a fragment-Shader was supplied, but the file did not exist, the Shader gets rejected

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/campaign.cc

    r5305 r5324  
    240240void Campaign::nextLevel()
    241241{
    242   printf("Campaign:nextLevel()\n");
     242  PRINTF(4)("Campaign:nextLevel()\n");
    243243  this->currentEntity->stop();
    244244}
  • trunk/src/util/resource_manager.cc

    r5323 r5324  
    387387            if(ResourceManager::isFile(fullName))
    388388            {
    389               char* secFullName = NULL;
    390389              if (param1 != NULL)
    391390              {
    392                 secFullName = ResourceManager::getFullName((const char*)param1);
    393                 printf("%s\n", secFullName);
     391                char* secFullName = ResourceManager::getFullName((const char*)param1);
    394392                if (ResourceManager::isFile(secFullName))
    395393                {
    396                   printf("ok:: %s\n", secFullName);
    397394                  tmpResource->secFileName = new char[strlen((const char*)param1)+1];
    398395                  strcpy(tmpResource->secFileName, (const char*) param1);
     396                  tmpResource->pointer = new Shader(fullName, secFullName);
    399397                }
    400                 else
    401                 {
    402                   delete[] secFullName;
    403                   secFullName = NULL;
    404                   tmpResource->secFileName = NULL;
    405                 }
     398                delete secFullName;
    406399              }
    407400              else
     401              {
    408402                tmpResource->secFileName = NULL;
    409               printf("%s::%s\n", fullName, secFullName);
    410               tmpResource->pointer = new Shader(fullName, secFullName);
    411               if (secFullName != NULL)
    412                 delete[] secFullName;
     403                tmpResource->pointer = new Shader(fullName, NULL);
     404              }
    413405            }
    414406            break;
Note: See TracChangeset for help on using the changeset viewer.