Changeset 6373 in orxonox.OLD for branches/avi_play/src/lib/graphics/importer/movie_player.cc
- Timestamp:
- Dec 31, 2005, 3:26:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/graphics/importer/movie_player.cc
r6353 r6373 49 49 if (glIsTexture(texture)) 50 50 glDeleteTextures(1, &texture); 51 SDL_FreeSurface(surface);51 //SDL_FreeSurface(surface); 52 52 53 53 // Free the RGB image … … 57 57 // Free the frame 58 58 av_free(frame); 59 60 avcodec_default_free_buffers(codec_context); 59 61 60 62 // Close the codec … … 197 199 codec_context->width*sizeof(uint8_t)*3); 198 200 199 //avcodec_flush_buffers(codec_context); 200 201 surface = SDL_CreateRGBSurfaceFrom(data, codec_context->width, 201 /* surface = SDL_CreateRGBSurfaceFrom(data, codec_context->width, 202 202 codec_context->height,24, 203 203 codec_context->width*sizeof(uint8_t)*3, … … 229 229 GL_UNSIGNED_BYTE, 230 230 surface->pixels); 231 glBindTexture(GL_TEXTURE_2D, 0);*/ 232 233 234 glBindTexture(GL_TEXTURE_2D, texture); 235 // update the texture 236 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 237 codec_context->width, codec_context->height, 238 GL_RGB, GL_UNSIGNED_BYTE, 239 data); 240 // build the MipMaps 241 gluBuild2DMipmaps(GL_TEXTURE_2D, 242 GL_RGB, 243 codec_context->width, 244 codec_context->height, 245 GL_RGB, 246 GL_UNSIGNED_BYTE, 247 data); 231 248 glBindTexture(GL_TEXTURE_2D, 0); 249 250 //avcodec_flush_buffers(codec_context); 251 232 252 } 233 253 else
Note: See TracChangeset
for help on using the changeset viewer.