Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/SceneGraph.cc @ 994:33616b2789de
SDL mode fix
author | yutaka@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 11 Oct 2010 14:21:02 +0900 |
parents | b2f7d2ad3804 |
children | 78ebcdaae8bc |
comparison
equal
deleted
inserted
replaced
993:8024a3a44832 | 994:33616b2789de |
---|---|
451 * image を 32bit(RGBA) に変換する | 451 * image を 32bit(RGBA) に変換する |
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_HWSURFACE, 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 SDL_Surface *converted; | 459 SDL_Surface *converted; |
460 converted = SDL_ConvertSurface(texture_image, tmpImage->format, | 460 converted = SDL_ConvertSurface(texture_image, tmpImage->format, |
461 SDL_HWSURFACE); | 461 SDL_SWSURFACE); |
462 if (converted != NULL) { | 462 if (converted != NULL) { |
463 SDL_FreeSurface(texture_image); | 463 SDL_FreeSurface(texture_image); |
464 texture_image = converted; | 464 texture_image = converted; |
465 } | 465 } |
466 | 466 |