Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document a means of efficient color swapping in 32-bit surfaces #118

Closed
pinobatch opened this issue Jan 18, 2019 · 0 comments
Closed

Document a means of efficient color swapping in 32-bit surfaces #118

pinobatch opened this issue Jan 18, 2019 · 0 comments

Comments

@pinobatch
Copy link

The file README.rst states:

Our thinking is that 8, 16, and (to some extent) 24-bit surfaces
are legacy formats, and not worth duplicating code four or more
times to support.

I agree with respect to 16- and 24-bit surfaces. But in my Pygame code, it has been an idiom to draw a single image several times with different colors by changing the palette between draw calls. For example, if three of 16 colors represent skin, and three other colors represent a character's uniform, I can draw two teams of light- and dark-skinned characters with one 8-bit sprite sheet and a variable palette. I'd appreciate it if the documentation mentioned a replacement technique suitable for use with the 32-bit surfaces of Pygame_SDL2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants