Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.