comparison src/SDL_compat.c @ 2371:3eb72191bb7e gsoc2008_iphone

Changed format of video texture to something compatible with iPhone ... a better solution is probably needed. Also set blending mode of video texture to none.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Fri, 18 Jul 2008 18:45:36 +0000
parents 91e601d9df8b
children
comparison
equal deleted inserted replaced
2370:73d04b25c118 2371:3eb72191bb7e
519 519
520 /* Create a texture for the screen surface */ 520 /* Create a texture for the screen surface */
521 SDL_VideoTexture = 521 SDL_VideoTexture =
522 SDL_CreateTexture(desired_format, SDL_TEXTUREACCESS_STREAMING, width, 522 SDL_CreateTexture(desired_format, SDL_TEXTUREACCESS_STREAMING, width,
523 height); 523 height);
524
524 if (!SDL_VideoTexture) { 525 if (!SDL_VideoTexture) {
525 SDL_VideoTexture = 526 SDL_VideoTexture =
526 SDL_CreateTexture(SDL_PIXELFORMAT_RGB888, 527 SDL_CreateTexture(SDL_PIXELFORMAT_ABGR8888,
527 SDL_TEXTUREACCESS_STREAMING, width, height); 528 SDL_TEXTUREACCESS_STREAMING, width, height);
528 } 529 }
529 if (!SDL_VideoTexture) { 530 if (!SDL_VideoTexture) {
530 return NULL; 531 return NULL;
531 } 532 }
533
534 SDL_SetTextureBlendMode(SDL_VideoTexture, SDL_TEXTUREBLENDMODE_NONE);
535
532 536
533 /* Create the screen surface */ 537 /* Create the screen surface */
534 SDL_VideoSurface = CreateVideoSurface(SDL_VideoTexture); 538 SDL_VideoSurface = CreateVideoSurface(SDL_VideoTexture);
535 if (!SDL_VideoSurface) { 539 if (!SDL_VideoSurface) {
536 return NULL; 540 return NULL;