# Where to Find ImGui Documentation and Tutorials in the Official Repository

> Find official ImGui documentation and tutorials directly within the ocornut/imgui repository. Explore the docs examples and backend folders for comprehensive guides and resources.

- Repository: [omar/imgui](https://github.com/ocornut/imgui)
- Tags: getting-started
- Published: 2026-07-21

---

**You can find all official ImGui documentation and tutorials inside the `ocornut/imgui` repository under the `docs/`, `examples/`, `backends/`, and root source directories, with the [`docs/README.md`](https://github.com/ocornut/imgui/blob/main/docs/README.md) serving as the primary entry point.**

Dear ImGui is a portable, renderer-agnostic C++ GUI library maintained in the `ocornut/imgui` repository. Every resource you need—from high-level integration guides to hands-on sample programs and API-level source comments—is stored directly in the repository. Instead of searching external sites, you should start your hunt for **ImGui documentation and tutorials** within these tracked directories.

## Official Documentation in the `docs/` Directory

The `docs/` folder contains the primary written guides for the library. These Markdown files cover setup, architecture, troubleshooting, and contribution policies.

### High-Level Guides and Setup Instructions

Start with [`docs/README.md`](https://github.com/ocornut/imgui/blob/main/docs/README.md) for a high-level overview, key concepts, and a quick-start checklist. For step-by-step integration instructions across platforms, the Getting-Started Wiki (`wiki/Getting-Started`) provides backend-specific setup details for Win32, GLFW, and SDL. If you need to choose or configure a renderer, [`docs/BACKENDS.md`](https://github.com/ocornut/imgui/blob/main/docs/BACKENDS.md) lists every supported backend—including OpenGL, DirectX, Vulkan, and Metal—and explains how to plug them into your application. The [`docs/EXAMPLES.md`](https://github.com/ocornut/imgui/blob/main/docs/EXAMPLES.md) file catalogs the ready-to-run sample projects located in the `examples/` directory.

### Specialized References

For common questions and troubleshooting, [`docs/FAQ.md`](https://github.com/ocornut/imgui/blob/main/docs/FAQ.md) addresses input routing, font handling, and UI quirks. Custom font loading and icon font integration are documented in [`docs/FONTS.md`](https://github.com/ocornut/imgui/blob/main/docs/FONTS.md), while security policies and contribution guidelines live in [`docs/SECURITY.md`](https://github.com/ocornut/imgui/blob/main/docs/SECURITY.md). To track new features and breaking changes, consult [`docs/CHANGELOG.txt`](https://github.com/ocornut/imgui/blob/main/docs/CHANGELOG.txt), which maintains a chronological version history according to the `ocornut/imgui` source code.

## Example Applications in the `examples/` Directory

The most reliable hands-on tutorials are the minimal programs in `examples/`. Each subdirectory ships with a [`README.md`](https://github.com/ocornut/imgui/blob/main/README.md) explaining build steps and couples the core library with a concrete backend.

### Platform-Specific Sample Projects

For a beginner-friendly starting point, the **OpenGL 3 + GLFW** example in `examples/example_glfw_opengl3` compiles with a single `make` command and wires together [`imgui_impl_glfw.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_glfw.cpp) and [`imgui_impl_opengl3.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_opengl3.cpp). Windows developers can open the Visual Studio solution in `examples/example_win32_dx11`, which pairs [`imgui_impl_win32.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_win32.cpp) with [`imgui_impl_dx11.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_dx11.cpp). Other validated combinations include **SDL2 + OpenGL2** ([`imgui_impl_sdl2.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_sdl2.cpp) + [`imgui_impl_opengl2.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_opengl2.cpp)), **Metal on macOS** (`imgui_impl_metal.mm`), **Vulkan** ([`imgui_impl_vulkan.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_vulkan.cpp)), and **WebGPU** ([`imgui_impl_wgpu.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_wgpu.cpp)). These examples are the definitive reference for how to initialize backends, handle frame loops, and shut down contexts correctly.

## Core Source Files as API Documentation

When you need exact function behavior or widget implementation details, the root source files are the authoritative **ImGui documentation**. Every public symbol and internal routine is documented in the headers and translation units at the repository root.

### Public API and Core Logic

All public declarations reside in [`imgui.h`](https://github.com/ocornut/imgui/blob/main/imgui.h), which defines the widgets, IO structures, and style APIs you include in your project. The matching definitions and frame-management logic live in [`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp), where core routines such as `ImGui::NewFrame()` and `ImGui::Render()` are implemented. If you are tracing how geometry is generated, [`imgui_draw.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_draw.cpp) contains the low-level draw-list building code.

### Widget and Layout Implementations

Specific widget behaviors are segmented into dedicated translation units. [`imgui_widgets.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_widgets.cpp) houses buttons, sliders, and inputs, while [`imgui_tables.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_tables.cpp) implements the modern `ImGui::BeginTable` API. [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp) is an especially valuable tutorial resource because it contains the source for `ImGui::ShowDemoWindow()` and demonstrates nearly every feature in action. Advanced users who need private structures or want to extend internals should read [`imgui_internal.h`](https://github.com/ocornut/imgui/blob/main/imgui_internal.h), as noted in the `ocornut/imgui` source code.

## Minimal GLFW and OpenGL 3 Integration Example

Below is a complete, runnable example based on `examples/example_glfw_opengl3`. It demonstrates the standard five-phase pattern: window creation, context creation, backend initialization, main loop, and cleanup.

```cpp
#include "imgui.h"
#include "backends/imgui_impl_glfw.h"
#include "backends/imgui_impl_opengl3.h"
#include <GLFW/glfw3.h>

int main()
{
    // 1. Initialise window + GL context
    glfwInit();
    GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui Demo", nullptr, nullptr);
    glfwMakeContextCurrent(window);
    glfwSwapInterval(1); // Enable vsync

    // 2. Initialise ImGui context
    IMGUI_CHECKVERSION();
    ImGui::CreateContext();
    ImGuiIO &io = ImGui::GetIO(); (void)io;

    // 3. Setup platform/renderer backends
    ImGui_ImplGlfw_InitForOpenGL(window, true);
    ImGui_ImplOpenGL3_Init("#version 130");

    // 4. Main loop
    while (!glfwWindowShouldClose(window))
    {
        glfwPollEvents();
        ImGui_ImplOpenGL3_NewFrame();
        ImGui_ImplGlfw_NewFrame();
        ImGui::NewFrame();

        // Your UI
        ImGui::Text("Hello, world!");
        ImGui::SliderFloat("float", &io.DeltaTime, 0.0f, 1.0f);
        ImGui::ShowDemoWindow(); // Built-in demo (see imgui_demo.cpp)

        // Rendering
        ImGui::Render();
        int display_w, display_h;
        glfwGetFramebufferSize(window, &display_w, &display_h);
        glViewport(0, 0, display_w, display_h);
        glClearColor(0.45f, 0.55f, 0.60f, 1.00f);
        glClear(GL_COLOR_BUFFER_BIT);
        ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
        glfwSwapBuffers(window);
    }

    // 5. Cleanup
    ImGui_ImplOpenGL3_Shutdown();
    ImGui_ImplGlfw_Shutdown();
    ImGui::DestroyContext();
    glfwDestroyWindow(window);
    glfwTerminate();
    return 0;
}

```

This snippet compiles the core [`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp), [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp), and backend files into a working application, following the build instructions in [`examples/example_glfw_opengl3/README.md`](https://github.com/ocornut/imgui/blob/main/examples/example_glfw_opengl3/README.md).

## Summary

- **Start with [`docs/README.md`](https://github.com/ocornut/imgui/blob/main/docs/README.md)** for an overview of the library and quick-start steps.
- **Browse [`docs/BACKENDS.md`](https://github.com/ocornut/imgui/blob/main/docs/BACKENDS.md) and [`docs/EXAMPLES.md`](https://github.com/ocornut/imgui/blob/main/docs/EXAMPLES.md)** to select and configure your renderer.
- **Clone and build an example** from the `examples/` directory that matches your platform and graphics API.
- **Read [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp)** to see working code for every widget and feature.
- **Consult [`imgui.h`](https://github.com/ocornut/imgui/blob/main/imgui.h) and [`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp)** for definitive API signatures and core logic.

## Frequently Asked Questions

### Where is the official ImGui documentation located?

All official written guides are stored inside the repository. The `docs/` directory contains [`README.md`](https://github.com/ocornut/imgui/blob/main/README.md), [`FAQ.md`](https://github.com/ocornut/imgui/blob/main/FAQ.md), [`FONTS.md`](https://github.com/ocornut/imgui/blob/main/FONTS.md), [`BACKENDS.md`](https://github.com/ocornut/imgui/blob/main/BACKENDS.md), and [`EXAMPLES.md`](https://github.com/ocornut/imgui/blob/main/EXAMPLES.md), while the GitHub Wiki hosts the Getting-Started guide. You do not need to leave the `ocornut/imgui` project to find authoritative **ImGui documentation and tutorials**.

### How do I find a working example for my graphics API?

Navigate to the `examples/` directory and choose the folder matching your backend, such as `example_glfw_opengl3` for OpenGL 3 or `example_win32_dx11` for DirectX 11. Each folder contains a [`README.md`](https://github.com/ocornut/imgui/blob/main/README.md) with build instructions and demonstrates how to link the corresponding `imgui_impl_*.cpp` backend files.

### Is [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp) a good tutorial resource?

Yes. [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp) is the source code behind `ImGui::ShowDemoWindow()`, and it contains exhaustive demonstrations of tables, plots, widgets, and layout techniques. It is widely regarded as the best practical tutorial for learning ImGui by example.

### What should I read if I need to understand internal widget behavior?

For precise implementation details, read [`imgui_widgets.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_widgets.cpp) for standard controls, [`imgui_tables.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_tables.cpp) for table layouts, and [`imgui_draw.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_draw.cpp) for draw-list generation. The public interface is declared in [`imgui.h`](https://github.com/ocornut/imgui/blob/main/imgui.h), with core frame logic implemented in [`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp) according to the `ocornut/imgui` source code.