| Summary: | SDL_Surface conversion does not set up blend mode when converting a color key | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mason Wheeler <masonwheeler> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | Other | ||
| OS: | Windows Vista | ||
This was already fixed in SDL_ConvertColorkeyToAlpha() |
--- C:\Users\Mason\AppData\Local\Temp\SDL_surface.-revBASE.svn001.tmp.c 2009-12-14 18:59:09.000000000 -0800 +++ C:\Users\Mason\Documents\SDL-1.3\SDL-1.3.0-4423\src\video\SDL_surface.c 2009-12-14 18:32:46.000000000 -0800 @@ -842,12 +842,14 @@ SDL_GetRGBA(surface->map->info.colorkey, surface->format, &keyR, &keyG, &keyB, &keyA); SDL_SetColorKey(convert, 1, SDL_MapRGBA(convert->format, keyR, keyG, keyB, keyA)); /* This is needed when converting for 3D texture upload */ SDL_ConvertColorkeyToAlpha(convert); + /*This is needed in SDL_CreateTextureFromSurface*/ + SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND); } SDL_SetClipRect(convert, &surface->clip_rect); /* Enable alpha blending by default if the new surface has an * alpha channel or alpha modulation */ if ((surface->format->Amask && format->Amask) ||