Changeset 5293 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Oct 7, 2005, 12:49:22 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/texture.cc
r5228 r5293 60 60 PRINTF(4)("Loading texture to OpenGL-Environment.\n"); 61 61 62 GLuint texture;63 62 int w, h; 64 63 SDL_Surface *image; … … 110 109 111 110 /* Create an OpenGL texture for the image */ 112 glGenTextures(1, &t exture);113 glBindTexture(GL_TEXTURE_2D, t exture);111 glGenTextures(1, &this->texture); 112 glBindTexture(GL_TEXTURE_2D, this->texture); 114 113 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 115 114 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); … … 134 133 SDL_FreeSurface(image); /* No longer needed */ 135 134 glBindTexture(GL_TEXTURE_2D, 0); 136 return texture;137 135 } 138 136 } … … 163 161 PRINTF(3)("loading Image %s\n", imageName); 164 162 if (tmpSurf) 165 this->texture =loadTexToGL(tmpSurf);163 loadTexToGL(tmpSurf); 166 164 167 165
Note: See TracChangeset
for help on using the changeset viewer.