compat.libgbm
#includeGBM buffer management API (Mesa), bound to the ecosystem's xim:mesa — zero host dependency
#include <gbm.h>
mcpp add compat.libgbm@25.0.7
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// 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 · 專案 tests/examples/gl
建置
- targets
gbm_binding (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
mcpp_generated/libgbm/include
原始檔 (1)
mcpp_generated/libgbm_anchor.c
產生的檔案
mcpp_generated/libgbm_anchor.c