Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nsauzede/vig
⚡ V ImGui module -- dear imgui / cimgui wrapper
https://github.com/nsauzede/vig
Last synced: 3 months ago
JSON representation
⚡ V ImGui module -- dear imgui / cimgui wrapper
- Host: GitHub
- URL: https://github.com/nsauzede/vig
- Owner: nsauzede
- License: mit
- Created: 2019-11-07T01:02:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T15:08:13.000Z (9 months ago)
- Last Synced: 2024-04-23T16:38:38.949Z (7 months ago)
- Language: C
- Homepage:
- Size: 23.4 KB
- Stars: 48
- Watchers: 6
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v - vig - Bindings for [Dear ImGui](https://github.com/ocornut/imgui) GUI toolkit. (Libraries / User Interface toolkits)
README
# vig
V ImGui module -- dear imgui / cimgui wrapperIf you are new to dear imgui see [here](https://github.com/ocornut/imgui)
If you are new to cimgui see [here](https://github.com/cimgui/cimgui)Current APIs available/tested in examples :
- create SDL2 / OpenGL window
- set clear color
- create ImGui subwindows
- create widgets : buttons, slider, text inputs, color picker, etc...
- persistent layout
- debug tools : FPS, stats, etc..# Examples
See in examples/mainig_v/mainig_v.v
This is a V port of ImGui example_sdl2_opengl3How to test `vig` on linux : (prerequisite : v is already installed and in the PATH)
```
$ v install nsauzede.vsdl2
$ v install nsauzede.vig
$ cd ~/.vmodules/nsauzede/vig
$ make
$ LD_LIBRARY_PATH=. v run examples/mainig/mainig.v
```There is also a hot-reload mode (-live) :
```
$ cd ~/.vmodules/nsauzede/vig
$ LD_LIBRARY_PATH=. v -live run examples/mainig/mainig.v
```
In hot-reload mode, once the vig demo windows is shown, try to modify the `live_main` function (tagged with `[live]`)
to see the "live" changes appearing a few instants after saving the source file.
Enjoy !# Dependencies
Ubuntu :
`$ sudo apt install git cmake libsdl2-dev libglew-dev`ClearLinux :
`$ sudo swupd bundle-add git cmake devpkg-SDL2 devpkg-glew`Windows/MSYS2 :
`$ pacman -S msys/git mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-glew`