No description
  • C 99%
  • Meson 0.9%
  • GLSL 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-15 02:03:05 +02:00
external Change text renderer from stb_freetype to pangoft2, add mgl_text_edit for a simple text editor 2026-04-18 00:32:50 +02:00
include/mgl Add support for numpad divide, multiply, subtract and add 2026-09-15 02:03:05 +02:00
protocol Fix fractional scaling on some systems 2026-09-12 03:01:25 +02:00
src Add support for numpad divide, multiply, subtract and add 2026-09-15 02:03:05 +02:00
tests Use font bold variant if bold requested, otherwise artificially set bold 2026-04-28 02:50:44 +02:00
.gitignore Finish wayland support 2026-04-24 05:23:51 +02:00
LICENSE Initial commit, skeleton 2021-10-10 10:59:43 +02:00
meson.build test -> executable 2026-06-02 16:43:41 +02:00
meson_options.txt Make tests optional 2026-06-02 16:22:08 +02:00
project.conf Use font bold variant if bold requested, otherwise artificially set bold 2026-04-28 02:50:44 +02:00
README.md Mention that libxkbcommon is a dependency with wayland 2026-05-12 23:55:42 +02:00
TODO Finish wayland support 2026-04-24 05:23:51 +02:00

Minimal Graphics Library

Written in C and uses OpenGL 2.1 to support as many platforms as possible.
Mgl supports both x11 and wayland and allows you to choose either glx or egl at runtime.

Dependencies

Build

  • libx11, libxrender, libxrandr
  • wayland-client, wayland-egl, wayland-scanner, libxkbcommon (Only needed if mgl is built with the -Dwayland=true meson option, which is set by default)
  • pango (pangoft2)

Runtime

libglvnd (libGL.so, libGLX.so, libEGL.so)

Notes

Every window get function is cached from the last event poll, no calls to x11/wayland is made.
Only one window can be created and used at once.
mgl needs to be initialized first and then a window has to be created before other functions are called.

TODO

Wayland support is not finished yet. Use MGL_WINDOW_SYSTEM_X11 for now in mgl_init.