Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5293 in orxonox.OLD for trunk


Ignore:
Timestamp:
Oct 7, 2005, 12:49:22 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: most remaining memory leaks are related to SDL_Video-buffer-stuff
remaining Errors are within the SDL-lib… or at least i think so
→ find the solution

Location:
trunk/src
Files:
3 edited

Legend:

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

    r5228 r5293  
    6060      PRINTF(4)("Loading texture to OpenGL-Environment.\n");
    6161
    62       GLuint texture;
    6362      int w, h;
    6463      SDL_Surface *image;
     
    110109
    111110      /* Create an OpenGL texture for the image */
    112       glGenTextures(1, &texture);
    113       glBindTexture(GL_TEXTURE_2D, texture);
     111      glGenTextures(1, &this->texture);
     112      glBindTexture(GL_TEXTURE_2D, this->texture);
    114113      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    115114      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     
    134133      SDL_FreeSurface(image); /* No longer needed */
    135134      glBindTexture(GL_TEXTURE_2D, 0);
    136       return texture;
    137135    }
    138136}
     
    163161          PRINTF(3)("loading Image %s\n", imageName);
    164162          if (tmpSurf)
    165             this->texture = loadTexToGL(tmpSurf);
     163            loadTexToGL(tmpSurf);
    166164
    167165
  • trunk/src/lib/sound/sound_engine.cc

    r5279 r5293  
    205205/**
    206206 *  standard deconstructor
    207 
    208 */
     207 */
    209208SoundEngine::~SoundEngine ()
    210209{
    211   SoundEngine::singletonRef = NULL;
    212 
    213210  // deleting all the SoundSources
    214211  if(this->sourceList != NULL)
     
    236233    delete bufferIterator;
    237234  }
     235
    238236  // removing openAL from AudioResource
    239237  alutExit();
     238
     239  SoundEngine::singletonRef = NULL;
    240240}
    241241
     
    307307
    308308/**
    309  *  adds a SoundSource to the sourceList of the SoundEngine
     309 * adds a SoundSource to the sourceList of the SoundEngine
    310310 * @param source The source to add to the sourceList
    311311*/
     
    392392
    393393/**
    394  *  SourceEngine::flushAllBuffers
    395 */
     394 * flushes all the Buffers
     395 * deletes them from the BufferList, and also removes them via the ResourceManager.
     396 */
    396397void SoundEngine::flushAllBuffers()
    397398{
     
    410411
    411412/**
    412   *  SourceEngine::flushAllBuffers
     413 * deletes all the Sources.
    413414 */
    414415void SoundEngine::flushAllSources()
  • trunk/src/orxonox.cc

    r5285 r5293  
    432432  delete orx;
    433433  ResourceManager::deleteFile("~/.orxonox/orxonox.lock");
    434 
    435 }
     434}
Note: See TracChangeset for help on using the changeset viewer.