vvvv / VL.StandardLibs

A collection of standard libraries for vvvv including VL.Stride, VL.Skia, VL.ImGui, msgpack.org[VL]
https://visualprogramming.net
GNU Lesser General Public License v3.0
36 stars 14 forks source link

Thread safe `cimgui` #2

Closed azeno closed 1 year ago

azeno commented 2 years ago

The cimgui shipped with the ImGui.NET package is sadly not thread safe (the current internal context is a static field). Did a quick test and it crashed badly. To make it thread safe we need to compile cimgui on our own. Did a quick test and it worked. The steps to build a modified version with a thread static internal context are

Note: To run the generator you need to extract luajit (from https://luapower.com/luajit) and mingw64 (from https://github.com/niXman/mingw-builds-binaries/releases) and add both their bin folders to the path variable inside the generator.bat file.

In our project we then need to exclude the native asset with ExcludeAssets="native" on the ImGui.NET package reference and include the custom built one.

azeno commented 1 year ago

Fixed by 9a96aeeed86e252ae7f9fb875bd964cbb2811a48