Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
wilhelm_renderer_imgui
Dear ImGui integration for the wilhelm_renderer stack.
Bundles Dear ImGui v1.91.8 with the GLFW and OpenGL3 backends, compiled as a static library with C FFI wrappers for Rust.
Architecture
wilhelm_renderer_imgui is a sibling of wilhelm_renderer — neither depends on the other. Both depend on wilhelm_renderer_sys, which bundles GLFW and provides the shared window/OpenGL context. Your application combines them: it asks wilhelm_renderer for a window, then hands the GLFW window pointer to ImGui::new.
┌─────────────────────────────────────────────────────────────┐
│ Application │
├──────────────────────────┬──────────────────────────────────┤
│ wilhelm_renderer │ wilhelm_renderer_imgui │
│ (App, Window, │ (Dear ImGui + GLFW/GL3 │
│ Renderer, Color, │ backends) │
│ graphics2d) │ │
├──────────────────────────┴──────────────────────────────────┤
│ wilhelm_renderer_sys (FFI + bundled GLFW/FreeType/glad) │
├─────────────────────────────────────────────────────────────┤
│ OpenGL (system) │
└─────────────────────────────────────────────────────────────┘
Installation
Add both sibling crates to your Cargo.toml:
[]
= "0.12"
= "0.9"
The two crates must agree on the underlying wilhelm_renderer_sys version (they share one statically-linked libglfw3.a). The published versions above are pinned to compatible sys versions; if you override either dependency, ensure both transitively pull in the same wilhelm_renderer_sys.
Build Requirements
- C++ compiler and CMake
- Linux:
libgl1-mesa-dev - Dear ImGui is bundled — no external ImGui dependency needed
- GLFW is supplied by
wilhelm_renderer_sys— no system GLFW required
Usage
use RefCell;
use Rc;
use ;
use ;
use ImGui;
Available Widgets
- Windows:
begin,end,set_next_window_pos/size - Text/Buttons:
text,button,checkbox - Sliders/Input:
slider_float/int,input_float/int - Color:
color_edit3/4 - Layout:
same_line,separator,spacing,indent - Tree:
tree_node,tree_pop - Combo:
begin_combo,end_combo,selectable - Menu:
begin_main_menu_bar,begin_menu,menu_item - Tables:
begin_table,table_next_row/column,table_setup_column - Popups:
begin_popup,open_popup,close_current_popup - Demo:
show_demo_window
Example
Run the interactive demo:
License
MIT