Modern C++20
Write cleaner, efficient, object-oriented code with current language features.
Modern C++ graphicslibmx2 streamlines SDL2 and OpenGL development with a modern C++20 design, bringing desktop applications, games, visual experiments, and WebAssembly experiences together in one flexible library.
libmx2 is designed to give developers an efficient and streamlined way to create multimedia applications. Built on SDL2 and OpenGL, it uses C++20 to simplify the details of cross-platform development so more attention can stay on the creative work.
Its modular architecture adapts to projects ranging from simple 2D games to complex 3D applications. SDL2 handles graphics, input, fonts, and sound, while optional OpenGL, OpenGL ES 3, GLM, and GLAD support opens the door to advanced rendering techniques.
From native desktop applications to browser-based WebAssembly experiences, libmx2 provides practical abstractions without hiding the hands-on nature of graphics programming. The included games and visual demos show how the same foundation can support many styles of work.
Write cleaner, efficient, object-oriented code with current language features.
Simplify windows, graphics, input, fonts, images, and sound across platforms.
Optional OpenGL, OpenGL ES 3, GLAD, and GLM support for 2D and 3D rendering.
Target Linux, Windows, macOS, and WebAssembly from a shared foundation.
Enable only the features your application needs, with static or dynamic linking.
Learn from Asteroids, Pong, Breakout, Matrix rain, 3D demos, and visual effects.
Explore a selection of graphics and game projects made with libmx2.
Clone the repository, configure the library with CMake, then build and install it:
git clone https://github.com/lostjared/libmx2.git
cd libmx2/libmx
mkdir build && cd build
cmake ..
make -j4
sudo make install
Games, renderers, experiments, and shader-driven visual projects built on the MX2 ecosystem.
Contributions are welcome. Fork the repository and submit a pull request with a feature, example, documentation improvement, or bug fix.