Browse Source

Switch back to explicit bitmask

This makes me feel more confident about endianness and the format.
master
Macoy Madson 1 year ago
parent
commit
1d3dffc996
  1. 4
      src/Presentation.cake

4
src/Presentation.cake

@ -91,12 +91,12 @@
(scope
(var font-surface (* SDL_Surface)
(SDL_CreateRGBSurfaceWithFormatFrom (path font-atlas-out > pixel-buffer)
(SDL_CreateRGBSurfaceFrom (path font-atlas-out > pixel-buffer)
(path font-atlas-out > width)
(path font-atlas-out > height)
32 ;; bit depth of each pixel (RGBA)
(* (path font-atlas-out > width) 4) ;; pitch (width of a row in bytes)
SDL_PIXELFORMAT_RGBA32))
0xff000000 0x00ff0000 0x0000ff00 0x000000ff))
(defer (SDL_FreeSurface font-surface)) ;; We don't need this after making the texture
(set (deref font-texture-out) (SDL_CreateTextureFromSurface renderer font-surface))
(unless (deref font-texture-out)

Loading…
Cancel
Save