| Summary: | Problem converting paletted surface to texture | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sebastian <mightyofthefmc> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
test programm to reproduce the bug
Screenshot of the issue |
||
|
Description
Sebastian
2013-07-02 05:05:14 UTC
I tested this with the latest RC build and it worked fine here, compiled both ways. Can you check to see if this is fixed for you? http://www.libsdl.org/tmp/download-2.0.php Created attachment 1220 [details]
Screenshot of the issue
I did a clean rebuild of the current HG of SDL2. The issue persists. I have attached a screenshot of the output in both cases. Is there any more information I can provide to get to the bottom of this? OK, I solved the issue: If i add the line colors[i].a = 255; to the loop at line 52 of the test program the display is just fine. The problem was, that random memory contents are copied into the palette and the call to SDL_MapRGB to find out the color for SDL_SetColorKey uses those values again. The SDL documentation states, that the fourth field of the SDL_Color struct is unused. Maybe this should be clarified in the documentation. For me this issue is resolved. Feel free to close. The documentation has been updated on the wiki, thanks for the feedback! |