Skip to content

nim-MiniFB is a small cross platform library to create a frame buffer that you can draw pixels in

Notifications You must be signed in to change notification settings

johnnovak/nim-minifb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nim-MiniFB

Nim wrapper/port of the cute MiniFB (Mini FrameBuffer) library originally written by Daniel Collin.

The usage in a nutshell:

  • mfbOpen opens a non-resizable window of the specified size.

  • mfbUpdate copies a buffer of 32-bit pixels (in XRGB format) into the window area and displays it. It returns true if ESC was pressed, false otherwise. The buffer must be at least WIDTH * HEIGHT * 4 bytes in size and must be managed by the application.

  • mfbClose closes 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).

About

nim-MiniFB is a small cross platform library to create a frame buffer that you can draw pixels in

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published