mcpp index

compat.libgbm

#include

GBM buffer management API (Mesa), bound to the ecosystem's xim:mesa — zero host dependency

#include <gbm.h>
mcpp add compat.libgbm@25.0.7

Usage

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

// The render half of the graphics stack: EGL hands out a context, GLES2 draws.
//
// Every FUNCTION and TYPE below comes from a module — `import khronos.egl;`
// and `import khronos.glesv2;`. The headers are included for the `EGL_*` and
// `GL_*` CONSTANTS only, which are macros and cannot be exported by a module.
//
// ─────────────────────────────────────────────────────────────────────────
// WHY THIS TEST EXISTS AND WHAT IT IS FOR
//
// "libGLESv2 exports 358 symbols" is not the claim worth making — a library
// built from the wrong dispatch table exports about that many too. The claim
// is that a program can get a context and DRAW, and the only honest way to
// check it is to draw and read the pixel back.
//
// So the file has two halves:
//
//   * assertions that hold on ANY machine, including a CI runner with no GPU:
//     the modules carry the API, the libraries are the ones this index built
//     rather than the ecosystem payload's same-soname copies, and all of them
//     route through ONE libGLdispatch;
//   * a real render, gated on a DRM device being present (MCPP_RUN_DRM_DEVICE),
//     because a runner has no /dev/dri at all.
// …

tests/examples/gl/tests/gl.cpp · project tests/examples/gl

Build

targets
gbm_binding (lib)
language
c++23
C standard
c11
import std
no
include dirs
mcpp_generated/libgbm/include

Sources (1)

  • mcpp_generated/libgbm_anchor.c

Generated files

  • mcpp_generated/libgbm_anchor.c

Versions

VersionPlatforms Mirrorssha256
25.0.7 latest Linux GLOBAL CN 03f0fd620941…