Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5216 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Sep 22, 2005, 4:44:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more fixes due to valgrind

Location:
trunk/src/lib/graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r5124 r5216  
    168168void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
    169169{
    170   SDL_WM_SetIcon(SDL_LoadBMP(icon), NULL);
    171 
     170  SDL_Surface* iconSurf = SDL_LoadBMP(icon);
     171
     172  SDL_WM_SetIcon(iconSurf, NULL);
    172173  SDL_WM_SetCaption (windowName, icon);
     174
     175  delete iconSurf;
    173176}
    174177
     
    211214    {
    212215      PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
    213       SDL_Quit();
     216      //    SDL_Quit();
    214217      //    return -1;
    215218    }
  • trunk/src/lib/graphics/graphics_engine.h

    r5084 r5216  
    2828    virtual ~GraphicsEngine();
    2929    /** @returns a Pointer to the only object of this Class */
    30     inline static GraphicsEngine* getInstance() { if (!singletonRef) singletonRef = new GraphicsEngine();  return singletonRef; };
     30    inline static GraphicsEngine* getInstance() { if (!GraphicsEngine::singletonRef) GraphicsEngine::singletonRef = new GraphicsEngine();  return GraphicsEngine::singletonRef; };
    3131
    3232    int init();
  • trunk/src/lib/graphics/importer/model.cc

    r5211 r5216  
    9292  this->faceCount = 0;
    9393  this->next = NULL;
     94  this->listNumber = 0;
    9495
    9596  this->firstFace = new ModelFace;
     
    108109  if (this->next !=NULL)
    109110    delete this->next;
     111
     112  //  if (this->listNumber != 0)
     113//    glDeleteLists(this->listNumber, 1);
    110114}
    111115
Note: See TracChangeset for help on using the changeset viewer.