mosra / magnum-integration

Integration libraries for the Magnum C++11 graphics engine
https://magnum.graphics/
Other
97 stars 44 forks source link

ImGui integration does not support adding UserCallback to DrawList #83

Closed arximboldi closed 2 years ago

arximboldi commented 3 years ago

The ImDrawList advanced API allows one to register arbitrary callbacks to change the OpenGL state during rendering. This can be used to manipulate shaders or, in my case, to temporarily change the glBlendFunc for the rendering of one particular widget.

This needs support from the rendering engine. The Magnum integration is ignoring these, but this is how the standard OpenGL integration handles them: https://github.com/ocornut/imgui/blob/6a161b878943241ddecbeee4ae27103dbd2d33d0/backends/imgui_impl_opengl2.cpp#L163

mosra commented 2 years ago

Fixed in #98, which is a continuation of #84.