Open illume opened 4 years ago
It's easy to emulate this with OpenGL, or to have a layer of indirection to perform the palette swap every time on pygame.display.update. I'm not sure if it's worth implementing the ugly but reliable solution here.
(The ugly but reliable solution would be to do the palette-swap in software. OpenGL is out of the question for reasons of portability. Even doing the swap with Renderer would mean adding fuctionality to upsteam SDL2)
From what I can tell, there is no easy solution for this. There are some users of this function, so it's important. However, there's no way to address it before the release of pygame 2 on the 28th of Oct. For these reasons I'll remove the critical label, and this can be added to a list of things that are not compatible (along with cdrom, and scrap) in the release.
set_palette is not supported in SDL2
See display.set_palette PR and issue:
SDL Palette documentation
https://wiki.libsdl.org/SDL_Palette https://wiki.libsdl.org/SDL_SetPaletteColors https://wiki.libsdl.org/SDL_AllocPalette https://wiki.libsdl.org/SDL_FreePalette
pygame.display.set_palette documentation
https://www.pygame.org/docs/ref/display.html#pygame.display.set_palette