Nim wrapper/port of the cute MiniFB (Mini FrameBuffer) library originally written by Daniel Collin.
The usage in a nutshell:
-
mfbOpenopens a non-resizable window of the specified size. -
mfbUpdatecopies a buffer of 32-bit pixels (in XRGB format) into the window area and displays it. It returnstrueif ESC was pressed,falseotherwise. The buffer must be at leastWIDTH * HEIGHT * 4bytes in size and must be managed by the application. -
mfbClosecloses the window (duh).
See the original documentation here and the test directory for examples.
Works on Windows, Mac OS X and X11 (FreeBSD, Linux, *nix). Most likely fails on platforms where it cannot allocate a 32-bit pixel buffer and probably only supports little-endian architectures (can't test either, sorry).