mcpp index

compat.glfw

#include

GLFW windowing and input library built from upstream sources

#include <GLFW/glfw3.h>
mcpp add compat.glfw@3.4

Usage

From this repository's own test project — built and run by CI, not written for the website.

#ifdef __linux__
#include <GLFW/glfw3.h>
int main() {
    glfwSetErrorCallback(nullptr);
    if (glfwInit()) glfwTerminate();   // tolerant: headless CI has no display
    return GLFW_VERSION_MAJOR == 3 ? 0 : 1;
}
#else
int main() { return 0; }
#endif

tests/examples/gui-stack/tests/glfw.cpp · project tests/examples/gui-stack

Build

targets
glfw (lib)
language
c++23
C standard
c11
import std
no
include dirs
include, src

Sources (13)

  • src/context.c
  • src/init.c
  • src/input.c
  • src/monitor.c
  • src/platform.c
  • src/vulkan.c
  • src/window.c
  • src/egl_context.c
  • src/osmesa_context.c
  • src/null_init.c
  • src/null_monitor.c
  • src/null_window.c
  • src/null_joystick.c

Versions

VersionPlatforms Mirrorssha256
3.4 latest LinuxWindowsmacOS CN GLOBAL c038d3420023…