-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
It seems like the biggest problem with supporting ImPlot is the fact that it doesn't provide explicitly typed functions, but rather relies on C++ templated parameters, i.e.:
// The templated functions are explicitly instantiated in implot_items.cpp.
// They are not intended to be used generically with custom types. You will get
// a linker error if you try! All functions support the following scalar types:
//
// float, double, ImS8, ImU8, ImS16, ImU16, ImS32, ImU32, ImS64, ImU64
...
#define IMPLOT_TMP template <typename T> IMPLOT_API
...
IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T));sadly with dear_bindings as of now, this generates C bindings which have the const T* values templated parameter in their signature, which fails to compile.
@ZimM-LostPolygon Since you showed interest to get ImPlot working, do you have a plan on tackling this?
cimplot seems to do this by generating a function binding for each explicit type:
and frankly this seems like the easiest solution. Perhaps this can be implemented under modifiers akin to mod_flatten_templates? Ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels