A C API for mobile and web app development with OpenGL ES and Metal, inspired by GLFW.
GLFM is a C API for building cross-platform mobile and web applications with OpenGL ES and Metal graphics. It abstracts platform-specific display setup, input handling, and sensor access, allowing developers to write portable graphics code for iOS, tvOS, Android, and WebGL. The library is inspired by GLFW but tailored for mobile and web environments.
C/C++ developers building cross-platform mobile games, simulations, or graphics-intensive applications that require low-level OpenGL ES or Metal access. It's ideal for those targeting iOS, Android, tvOS, and WebGL from a single codebase.
GLFM provides a consistent, minimal API across mobile and web platforms, reducing the complexity of handling platform-specific graphics and input code. Its lightweight design and focus on core functionality make it easy to integrate with other libraries while maintaining portability.
OpenGL ES and input for iOS, tvOS, Android, and WebGL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a single C API for OpenGL ES and Metal across iOS, tvOS, Android, and WebGL, simplifying portable graphics code as shown in the feature matrix.
Focuses solely on display setup and input handling, adhering to a Unix-like philosophy that avoids bloat and eases integration with other libraries.
Handles mobile and web event loops seamlessly, with callbacks for rendering, input, and lifecycle events, ensuring compatibility with iOS and HTML5 environments.
Includes touch, keyboard, sensor events, and virtual keyboard integration across platforms, with high-DPI and safe area handling for modern devices.
Explicitly omits common features like image loading, audio, and UI toolkits, forcing developers to rely on additional libraries for a complete app.
Features such as mouse events on iOS are restricted to iPad with newer OS versions, and macOS support is labeled as preliminary and not release-quality.
All GLFM functions must be called on the main thread, which can hinder performance optimizations in multi-threaded graphics applications.
Integrating with Android Studio requires manual CMake and Gradle configuration, as noted in the README, which can be tedious and error-prone.