Skip to content

dinau/imguinz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImGuinZ

This project aims to simply and easily build Dear ImGui (CImGui) / ImPlot (CImPlot) examples in Zig language with less external dependencies.

ImGui/CimGui version 1.91.0dock (2024/08)

  • Features
    • Included Font Awesome Icon fonts.
      alt
    • Included GLFW 3.3.9 static library
    • Included SDL2/SDL3 libraries
    • Inlcuded STB libraries (only stb_image)
    • Available ImPlot (CImPlot) with ImDrawIdx="unsigned int"
    • Enabled Input method (IME) flag with IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS

Prerequisites


  • Windows10 OS or later
  • Use Zig: 0.12.0
  • Zig 0.13.0 ? (Compiling is ok so far)
  • MSys/MinGW basic commands (make, rm, cp, strip ...)

Build and run


  1. Download this project.

    git clone --recurse-submodules https://github.com/dinau/imguinz
  2. Go to one of the examples folder,

    cd imguinz/examples/glfw_opengl3
  3. Build and Run

    make run                

    or

    zig build --release=fast run

Examples screen shots

glfw_opengl3 / sdl2_opengl3 / sdl3_opengl3


glfw_opengl3 / sdl2_opengl3 / sdl3_opengl3

alt

glfw_opengl3_jp


glfw_opengl3_jp

alt

glfw_opengl3_image_load


glfw_opengl3_image_load

alt
Image file captured would be saved in the folder ./zig-out/bin.
Image can be saved as JPEG / PNG / BMP / TGA file.

glfw_opengl3_implot


glfw_opengl3_implot

alt

ImPlot Demo written in Zig lang.


Now work in progress.

Build and run

pwd
examples/imPlotDemo
make run   # or zig build --release=fast run

ImPlot demo source in Zig lang.


demoAll.zig

Plots Tab


LinePlots (Dynamic)

alt

BarGroups

alt

BarStacks

alt

PieCharts

alt

Heatmaps

alt

Histogram2D

alt

Images

alt

Axes Tab


LogScale

alt

Subplots Tab


Tables (Dynamic)

alt

Tools Tab


DragRects

alt

Show / Hide console window


Open build.zig in each example folder and
Hide console window: Default,
Show console window: Commet out this line as follows,

... snip ...
//exe.subsystem = .Windows;  // Hide console window
... snip ...

and rebuild example.

SDL libraries


My tools version


  • Git version 2.45.2.windows.1
  • Make: GNU Make 4.4.1
  • Zig: 0.12.0 (zig cc: clang version 17.0.6)
  • SDL2 ver.2.30.3
  • SDL3 2024-08-04

Similar project


Language Project
Nim ImGuin, Nimgl_test, Nim_implot
Lua LuaJITImGui
Python DearPyGui for 32bit WindowsOS Binary
Zig, C lang. Dear_Bindings_Build
Zig ImGuinZ