Skip to content
/ imguinz Public

Dear Imgui / CImGui, ImPlot/CImPlot wrapper for Zig language

License

Notifications You must be signed in to change notification settings

dinau/imguinz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImGuinZ

This project aims to simply and easily build Dear ImGui examples with Zig language using CImGui / CImPlot as first step.

ImGui/CimGui version 1.90.9dock (2024/07)

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 ...)

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/zig_glfw_opengl3
  3. Build and Run

    make run                

    or

    zig build --release=fast run

Examples screen shots

zig_glfw_opengl3 / zig_sdl2_opengl3


GLFW SDL2 SDL3
zig_glfw_opengl3 zig_sdl2_opengl3 zig_sdl3_opengl3

alt

zig_glfw_opengl3_jp


GLFW
zig_glfw_opengl3_jp

alt

zig_glfw_opengl3_image_load


GLFW
zig_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.

zig_glfw_opengl3_implot


GLFW
zig_glfw_opengl3_implot

alt

ImPlot Demo written in Zig lang.


Now work in progress.

Build and run

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

ImPlot demo source in Zig


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

Hiding console window


Open build.zig in each example folder and enable option line as follows,

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

and execute make.

SDL libraries


My tools version


  • git version 2.45.2.windows.1
  • make: GNU Make 4.3
  • Python 3.12.3
  • zig: 0.12.0 (zig cc: clang version 17.0.6)
  • SDL2 ver.2.30.3
  • SDL3 2024-06-02

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