A simple gui to generate a window and allow plotting. Great for quick debugging and drawing of data.
Magnum gives easy opengl support.
Make sure to clone the submodules too.
git submodule init
git submodule update
This utilizes Dear ImGui, Magnum, ImPlot.
Corrade
Magnum
magnum-integration
imgui * cloned into src/MagnumExternal/ImGui directory
add implot and implot3
Build with the make deps
and make
make sure to add a LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/you/programs/simple-magnum-gui/.deps/usr/lib:${LD_LIBRARY_PATH}
to find the libraries
Use vpckg to install other dependencies. vcpkg
Make sure you are in classic mode and install
- SDL2
- Freetype
- libjpeg-turbo
$env:PATH="C:\Users\you\programs\simple-magnum-gui.deps\usr\bin;$env:PATH"
and SDL2 from vcpkg
$env:PATH="C:\Users\you\programs\vcpkg\installed\x64-windows\bin;$env:PATH"
These are encapsulated into the dependencies directory.
The cmake commands are implemented in shell script wrappers in the
scripts directory.
FYI both of the above scripts install to ~/.local.
Gui uses a naive callback system to enable different systems. See the examples
- Start the gui window with GuiBase
- create a DrawCallback
- set your static callback function with prototype
int callback_function(void* data); - set any events (mouse move, mouse scroll, key press) with the relevant prototypes
- set your data
- set your static callback function with prototype
- add the callback to your guibase object
- run your game loop and call the gui function
mainLoopIteration
