Closed Baekalfen closed 5 years ago
I've been planning on using sdl2.ext.colorpalettes.GRAY2PALETTE
for my Renderer-based reimplementation of the GameWindow. From what I've seen, it would not do much to change GameWindow_SDL2.py
as it is simply a list of cached sdl2.ext.color.Color
objects, which are useful for Renderers, but not when you need to write directly to the screen buffer returned by pixels2d
.
Also fyi, all the colors in that palette are the same except for the light gray, which is 0xAA instead of 0x99, so it's a little lighter.
My hope was to reduce some of the overhead of get_color_code
and some of the other rendering code. I haven't really look into what the color palettes are capable of, so if it has no use, then we can just close the issue.
I think most of that overhead is in combining the bits and doing the BGP/OBP0/OBP1 lookups, unfortunately, so it probably won't help there.
I agree. I think this issue actually predates all of that. I'll just close it.
http://pysdl2.readthedocs.io/en/rel_0_9_4/modules/sdl2ext_colorpalettes.html