| Summary: | SDL_SetTextureAlphaMod does not work with SDL_FlipMode or rotation in the software renderer | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Adam M. <adam> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.3 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: | proposed patch (v1) | ||
|
Description
Adam M.
2014-05-11 20:04:35 UTC
It also doesn't work when the texture is rotated (but not flipped), with the same symptoms. Created attachment 2192 [details] proposed patch (v1) I've proposed a patch to fix this problem. You may want to apply the patch for bug #1550 first. (Bug #1550 may also break this scenario.) Fixed, thanks! https://hg.libsdl.org/SDL/rev/c2ba8ab27c1a I don't like duplicating the code to copy color key, alpha mod, color mod, and blend mode between surfaces. It seems like there should be a helper function to do that kind of thing, in case more blending options are added in the future. Maybe it should copy the palette too, if the places that would call the helper also copy the palette. I already fixed two pieces of code that assumed the only blending option was the color key. There may be more code that makes the same assumption. But that seemed like I'd have to add a new file to the code base (SDL_surface_c.h), and I'm not sure what all is involved in that -- possibly updating all the different project and make files -- so I didn't do it. But it seems like a good thing to do. |