mcpp index

ocornut.imgui

import

Dear ImGui 1.92.8 core and GLFW/OpenGL3 backend modules for mcpp (import imgui.core;)

import imgui.core;

Module name read from the upstream `export module` declaration in src/core.cppm.

mcpp add ocornut.imgui@1.92.8

Usage

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

// Public imgui module package end-to-end assertion: import-only consumption
// (imgui.core + glfw_opengl3 backend), context + font atlas + one frame,
// software-only (no window). Linux-only (see mcpp.toml).
#ifdef __linux__
import std;
import imgui.core;
import imgui.backend.glfw_opengl3;

int main() {
    auto init = &ImGui::Backend::GlfwOpenGL3::Init;
    auto shutdown = &ImGui::Backend::GlfwOpenGL3::Shutdown;
    if (init == nullptr || shutdown == nullptr) {
        return 1;
    }

    ImGuiContext* context = ImGui::CreateContext();
    if (context == nullptr) {
        return 2;
    }
    ImGui::SetCurrentContext(context);

    ImGuiIO& io = ImGui::GetIO();
// …

tests/examples/imgui-module/tests/imgui_module.cpp · project tests/examples/imgui-module

Build · upstream manifest

modules
imgui.core
targets
imgui (lib)
manifest version
1.92.8
dependencies
compat
source
https://raw.githubusercontent.com/mcpplibs/imgui-m/1.92.8/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
1.92.8 latest LinuxWindowsmacOS CN GLOBAL dec31c8317cd…