Skip to content

SDL_gfx 2.0.28

Latest

Choose a tag to compare

@ferzkopp ferzkopp released this 16 Nov 04:32

SDL_gfx 2.0.28

Maintenance release of SDL_gfx for SDL 1.2 (classic SDL-1.2 or sdl12-compat). The API and ABI are unchanged
(libSDL_gfx.so.16); programs built against 2.0.27 keep working. GitHub (https://github.com/ferzkopp/SDL_gfx)
is now the primary repository.

Highlights

  • Image filters work on every platform again. On x64 builds (and all non-x86 builds) every filter processed only
    the last length % 8 bytes, and the convolution/Sobel filters did nothing. The filters are now portable C with
    the same results as the former MMX code.
  • Crash and hang fixes: 8-bit zoom with mirroring factors on 64-bit platforms, shrinkSurface with factor 0,
    NaN/infinite/huge rotozoom parameters, NULL surfaces, vertex arrays and strings in the primitives, NULL framerate
    managers, and SDL_framerateDelay after 49.7 days of uptime.
  • Correct results: rotozoomSurfaceXY with different x/y zoom (GitHub #2), polygons spanning more than 32767
    pixels, full-circle arcs, zero-length thick lines, SDL_gfxBlitRGBA blending, SDL_gfxSetAlpha on RGBA8888
    surfaces, copy shortcuts of the image filters, anti-aliased ellipses with large radii, rotozoom with very small zoom
    factors or sources wider than 32767 pixels.
  • Thread-safe polygon fills without the global buffer (which also leaked); huge shapes are clipped to the
    visible rows (much faster).

Upgrade notes

  • SDL_imageFilterShiftRightUint/ShiftLeftUint now process the whole buffer (as native-endian 32-bit words) and
    SDL_imageFilterNormalizeLinear uses the exact scale factor; Cmax == Cmin returns -1.
  • texturedPolygon returns 0 on success (it returned 1).
  • SDL_imageFilterMMXdetect/MMXon/MMXoff are deprecated no-ops.
  • Known limitation (unchanged): semi-transparent outlines (rounded rectangles, ellipses, pies, trigons, polygons,
    bezier curves) blend the pixels where their segments meet twice. SDL2_gfx and SDL3_gfx draw them correctly.
  • The build system is CMake (autotools and the Visual Studio projects were removed): find_package(SDL_gfx) with
    the targets SDL_gfx::SDL_gfx/SDL_gfx::SDL_gfx-static, or pkg-config SDL_gfx. See BUILDING.md.

Full list of changes: CHANGELOG.md. Review findings and their fixes: CODE_REVIEW.md.