mcpp index

compat.opengl

#include

Khronos OpenGL API headers for mcpp packages

#include <GL/gl.h>
mcpp add compat.opengl@2026.05.31

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// Faithful migration of smoke_compat_core.sh: gtest + ftxui + lua + mbedtls +
// OpenGL/KHR headers. main() comes from the gtest "main" feature.
#include <array>
#include <string>

#include <GL/gl.h>
#include <KHR/khrplatform.h>
#include <ftxui/dom/elements.hpp>
#include <ftxui/screen/screen.hpp>
#include <gtest/gtest.h>
#include <mbedtls/sha256.h>

extern "C" {
#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>
}

static bool check_ftxui() {
    using namespace ftxui;
    Element document = hbox({text("compat"), separator(), text("ftxui")});
    Screen screen = Screen::Create(Dimension::Fit(document), Dimension::Fit(document));
// …

tests/examples/core/tests/runtime.cpp · 项目 tests/examples/core

构建

targets
opengl (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/api, mcpp_generated/include

源文件 (1)

  • mcpp_generated/opengl_empty.c

生成的文件

  • mcpp_generated/opengl_empty.c
  • mcpp_generated/include/GL/gl.h

版本

版本平台 镜像sha256
2026.05.31 最新 LinuxWindowsmacOS CN GLOBAL 3dadc4ccfe4b…