Skip to content

SDL2's built-in support for 8-bit palettized surfaces seems unreliable and inconsistent, so this is a custom solution for that problem

License

Notifications You must be signed in to change notification settings

robotjunkyard/sdl2-canvas-8bit-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdl2-canvas-8bit-boilerplate

SDL2's support for 8-bit palettized surfaces seems unreliable and inconsistent, so this is a custom solution for that problem.

Canvas::updateSDLTexture() is what ultimately blits the Canvas's pixmap to an actual native SDL2 surface, using the palette that's assigned to a particular Canvas-type object. The example Palette used in this template code is a slight modification of the 32-color 'db32' palette by Richard Fhager, shifted one up since color 0 is treated as 'Transparency' by the Canvas::blitBitmapMasked() method.

About

SDL2's built-in support for 8-bit palettized surfaces seems unreliable and inconsistent, so this is a custom solution for that problem

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages