Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6846 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jan 30, 2006, 2:37:22 AM (19 years ago)
Author:
bensch
Message:

trunk: valgrind

Location:
trunk/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/sprite_particles.cc

    r6812 r6846  
    103103void SpriteParticles::draw() const
    104104{
    105   glPushAttrib(GL_ENABLE_BIT);
    106105
    107106  Particle* drawPart = particles;
     
    110109  GLboolean checkLight = false;
    111110  glGetBooleanv(GL_LIGHTING, &checkLight);
     111  glPushAttrib(GL_LIGHTING_BIT);
    112112  if (checkLight == GL_TRUE)
    113113    glDisable(GL_LIGHTING);
    114114
    115   glEnable(GL_ALPHA_TEST);
    116115  glDepthMask(GL_FALSE);
    117116  /*
  • trunk/src/lib/sound/sound_engine.cc

    r6844 r6846  
    162162  // updating the Listeners Position
    163163  if (likely(this->listener != NULL))
    164     {
    165       alListener3f(AL_POSITION,
    166                    this->listener->getAbsCoor().x,
    167                    this->listener->getAbsCoor().y,
    168                    this->listener->getAbsCoor().z);
    169       alListener3f(AL_VELOCITY,
    170                    this->listener->getVelocity().x,
    171                    this->listener->getVelocity().y,
    172                    this->listener->getVelocity().z);
    173       Vector absDirV = this->listener->getAbsDirV();
    174       ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z};
    175       alListenerfv(AL_ORIENTATION, orientation);
    176     }
     164  {
     165    alListener3f(AL_POSITION,
     166                 this->listener->getAbsCoor().x,
     167                 this->listener->getAbsCoor().y,
     168                 this->listener->getAbsCoor().z);
     169    alListener3f(AL_VELOCITY,
     170                 this->listener->getVelocity().x,
     171                 this->listener->getVelocity().y,
     172                 this->listener->getVelocity().z);
     173    Vector absDirV = this->listener->getAbsDirV();
     174    ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z};
     175    alListenerfv(AL_ORIENTATION, orientation);
     176  }
    177177  else
    178178    PRINTF(2)("no listener defined\n");
     
    220220{
    221221  /// FIXME
    222 /*  if(this->sourceList && this->bufferList)
    223   {
    224     tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
    225     SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
    226     while (enumBuffer)
    227     {
    228       tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
    229       SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
    230       while (enumSource)
     222  /*  if(this->sourceList && this->bufferList)
     223    {
     224      tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
     225      SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
     226      while (enumBuffer)
    231227      {
    232         if (enumBuffer == enumSource->getBuffer())
    233           break;
    234         enumSource = (SoundSource*)sourceIterator->nextElement();
     228        tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
     229        SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
     230        while (enumSource)
     231        {
     232          if (enumBuffer == enumSource->getBuffer())
     233            break;
     234          enumSource = (SoundSource*)sourceIterator->nextElement();
     235        }
     236        delete sourceIterator;
     237        if (enumSource == NULL)
     238          ResourceManager::getInstance()->unload(enumBuffer);
     239        enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
    235240      }
    236       delete sourceIterator;
    237       if (enumSource == NULL)
    238         ResourceManager::getInstance()->unload(enumBuffer);
    239       enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
    240     }
    241     delete bufferIterator;
    242 }*/ /// FIXME
     241      delete bufferIterator;
     242  }*/ /// FIXME
    243243}
    244244
     
    278278  const char* deviceList = (const char*)alcGetString(NULL,ALC_DEVICE_SPECIFIER);
    279279  const char* devWalk = deviceList;
    280 //  if (alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT") == AL_TRUE)
    281 { // try out enumeration extension
     280  //  if (alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT") == AL_TRUE)
     281  { // try out enumeration extension
    282282    PRINTF(3)("Enumeration-extension found\n");
    283283
     
    287287      PRINTF(3)("%s\n", devWalk);
    288288      devWalk += strlen(devWalk)+1;
    289     } while (devWalk[0] != '\0');
     289    }
     290    while (devWalk[0] != '\0');
    290291
    291292
     
    293294  }
    294295  // INITIALIZING THE DEVICE:
    295 /*
    296 #ifdef AL_VERSION_1_1
    297   ALCchar deviceName[] =
    298 
    299 #ifdef __WIN32__
    300       "Direct3D";
    301 #else
    302       "'( ( devices '( native null ) ) )";
    303 #endif
    304   //
    305   this->device = alcOpenDevice(deviceName);
    306 
    307   this->context = alcCreateContext(this->device, NULL);
    308 
    309   alcMakeContextCurrent(this->context);
    310 #else*/
     296  /*
     297  #ifdef AL_VERSION_1_1
     298    ALCchar deviceName[] =
     299
     300  #ifdef __WIN32__
     301        "Direct3D";
     302  #else
     303        "'( ( devices '( native null ) ) )";
     304  #endif
     305    //
     306    this->device = alcOpenDevice(deviceName);
     307
     308    this->context = alcCreateContext(this->device, NULL);
     309
     310    alcMakeContextCurrent(this->context);
     311  #else*/
    311312  this->device = alcOpenDevice(NULL);
    312313  SoundEngine::checkError("Error opening Device", __LINE__);
     
    315316  alcMakeContextCurrent(this->context);
    316317  this->checkError("Making Context Current", __LINE__);
    317 // #endif
     318  // #endif
    318319
    319320  if ((result = alGetError()) != AL_NO_ERROR)
     
    378379{
    379380  switch(err)
    380     {
     381  {
    381382    case AL_NO_ERROR:
    382383      return ("AL_NO_ERROR");
     
    391392    case AL_OUT_OF_MEMORY:
    392393      return ("AL_OUT_OF_MEMORY");
    393     };
     394  };
    394395}
    395396
Note: See TracChangeset for help on using the changeset viewer.