ImGui.NET icon indicating copy to clipboard operation
ImGui.NET copied to clipboard

ImGui class should be non static, non sealed class

Open Shadowblitz16 opened this issue 3 years ago • 2 comments

ImGui class should be non static, non sealed class so that we can easier implement it in our own libraries

For example one might want to write sdl or raylib-cs extensions methods for the ImGui class to more easily integrate into their engine. Or one might just want to just inherit it completely to give it a new name.

Shadowblitz16 avatar Jul 29 '22 04:07 Shadowblitz16

no

Tabizzz avatar Aug 23 '22 19:08 Tabizzz

That is probably not the best way to get the abstraction you are looking for. Un-sealing the class could have implications for the design of the binding, and seems like overkill for what you are trying to achieve.

A better way would be to write your own 'Backend' and/or 'Renderer' class for the engine in question. The imgui documentation gives some guidance here, and event provides some examples in their repo. It's somewhat easy to take an existing backend and translate it C# and adapt it to use your engine.

sfuller avatar Sep 13 '22 06:09 sfuller