[CM] SDL is unchanged still but here's another for ImGui

chohag at jtan.com chohag at jtan.com
Sun Jul 7 12:32:38 PDT 2024


Continuing from my SDL wrapper I have an S7 interface to ImGui. As
with SDL it's just been started and I've only got as far as I need
to make sure the libraries initialise and talk to each other.

On the other hand in both cases what's left is mostly writing the
S7 interface functions which for the most part should require only
naming the constant or function. Anyone like writing long lists of
repetetive code?

Unfortunately due to the way I've put together the project these
libraries are for, I've had to abandon s7imgui.scm and write it in
C directly but converting it back to a scheme module is straightforward
and (I've tested this) the ImGui .o files can be linked into a
loadable .so by cload.scm.

I'm copying the ImGui mailing list in to this email (if they've got
one, the project looks very modern) so they're aware that there's
another language interface in the works; any comments or suggestions
there are very welcome.

The demo can (still) be cloned from http://zeus.jtan.com/~chohag/balls.git

The interesting files for ImGui are:

cimgui.cpp & cimgui.h - C interface to ImGui

s7imgui.w - S7 wrapper around cimgui

glimgui.wpp - renderer, the "backend" in ImGui terms

And of course (build-ui) and the surrounding code from balls.scm.

The backend in glimgui.wpp expects to be used with the threaded
OpenGL draw tree that builds on s7sdl.scm (the undocumented draw.w)
but only *uses* the wrapper in s7imgui.w, it's not an essential
part of it.

Finally if anyone is interested I have ~750 lines of nuklear.scm
which I got to as far as displaying a window before I decided to
use ImGui instead. I'll not be using it again so if anyone wants
to finish an S7 wrapper around nuklear then let me know before it
ends up getting lost in the bowels of my $HOME.

Matthew

... Too modern for a mailing list, there is at least a contact address.
 


More information about the Cmdist mailing list