comparison Renderer/Engine/SceneGraph.cc @ 996:78ebcdaae8bc

add sdl_test file
author yutaka@charles.cr.ie.u-ryukyu.ac.jp
date Mon, 11 Oct 2010 18:56:51 +0900
parents 33616b2789de
children 431936c0cc96
comparison
equal deleted inserted replaced
995:143e4f9af7be 996:78ebcdaae8bc
452 */ 452 */
453 SDL_Surface *texture_image = IMG_Load(image_name); 453 SDL_Surface *texture_image = IMG_Load(image_name);
454 if (!texture_image) return 0; 454 if (!texture_image) return 0;
455 SDL_Surface *tmpImage 455 SDL_Surface *tmpImage
456 = SDL_CreateRGBSurface(SDL_SWSURFACE, texture_image->w, 456 = SDL_CreateRGBSurface(SDL_SWSURFACE, texture_image->w,
457 texture_image->h, 32, redMask, 457 texture_image->h, 32, redMask,
458 greenMask, blueMask, alphaMask); 458 greenMask, blueMask, alphaMask);
459
460 //= SDL_CreateRGBSurface(SDL_HWSURFACE, 0,
461 // 0, 32, redMask,
462 // greenMask, blueMask, alphaMask);
463
459 SDL_Surface *converted; 464 SDL_Surface *converted;
460 converted = SDL_ConvertSurface(texture_image, tmpImage->format, 465 converted = SDL_ConvertSurface(texture_image, tmpImage->format,
461 SDL_SWSURFACE); 466 SDL_HWSURFACE);
467
468 //SDL_SetAlpha(converted, 0, 0);
469
462 if (converted != NULL) { 470 if (converted != NULL) {
463 SDL_FreeSurface(texture_image); 471 SDL_FreeSurface(texture_image);
464 texture_image = converted; 472 texture_image = converted;
465 } 473 }
466 474