/mfb

Frame buffer graphic (mouse, keyboard) library for V

Primary LanguageVApache License 2.0Apache-2.0

A framebuffer graphic library

The library is unstable atm!

  • 2D Graphic support (compatible with gg)
  • Keyboard support (a little buggy)
  • Mouse support

Why MFB is exist while we have V's GG library?

GG MFB
GG is a graphic library for designed desktop applications. It can be used any way as a desktop application. MFB is designed a framebuffer graphic library for Linux.
Designed for desktop applications Designed for Linux TTY
Require a (X11) display server Don't require a display server
GG is not written in Pure V. (GG is a wrapper for sokol graphic library) MFB is written in Pure V
Supports unicode input/mouse Supports only english layout (for now)/mouse
GG is not support framebuffer1 MFB's first goal is supporting frambuffer
GG has more powerful API MFB has less powerful API

1: It doesn't seems like GG will supported in future. floooh/sokol #702

After all, You can understand MFB is not enemy of GG. MFB's goal is making applications that made with GG have more platform and user.

Support

mfb_player.mp4
  • MUI (UI Kit) is supported by mfb-backend branch
  • MUIMPV (The video player widget for MUI) is supported by mfb-backend branch. (Requires MUI)
  • Most basic gg application can be ported with changing import gg with import malisipi.mfb as gg. (Also mfb.context must be mutable as different than gg to draw.)

Flags

Flag Description
-d show_fps Shows fps count
-d unlimited_fps Removes fps limit (It can be cause HIGH CPU usage)

License

  • This project was licensed by Apache 2.0 License (./LICENSE)
  • VPNG module was licensed by MIT License (./vpng) (The module was edited for making maximum compatibility with the library. The original module is here)
  • ./examples/ported/mit was licensed by MIT License (./examples/ported/mit)
  • Phinger Cursors is licensed by CC-BY-SA-4.0 (Author: phisch (Philipp Schaffrath) on GitHub) (./assets/cursor)
  • Google Icons is licensed by Apache 2.0 (./examples/mfb-player/assets).