ImGui can now also support Haiku

Hi everyone. Just a quick note that it was really easy to get ImGui to support Haiku by adding the following to imgui_impl_opengl3.cpp (somewhere near the top).

#if defined(__HAIKU__ )
#define GL_GLEXT_PROTOTYPES 1
#include <GL/gl.h>
#include <GL/glext.h>
#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM
#endif

That’s all that is required (dont forget to link to libGL.so and the project I used has glfw3 backend. Tested with glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API); and glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

I’ve sent a patch request to ocornut (developer of ImGui), so it’s in review, but until it gets accepted, you can easily get ImGui working with Haiku.

5 Likes

(I edited your post to fix the markup problem)

All that’s missing is a .recipe on Haikuports! :sunglasses:

Nice! I love Dear ImGui - have only used it once or twice but is’t excellent when you want to get some kind of UI up and running fast over a frame buffer

What exactly is imgui? it would be great if we got more information about it and it wasn’t just thrown in there.

For HiRes monitors, the size of gui elements should be doubled. I don’t know if this can be done easily in this ImGui. Or maybe this ImGui can take into account the ppi of the monitor? That would be even better.
…I tried the Windows exe demos on wine (in Linux).

If you’re not a developper and Dear ImGUI doesn’t sound familiar to you : it’s normal.

Dear ImGUI is another way to write GUI in C++.

It’s used a lot in the gaming industry as far as I know

If a developper decide to write an application’s GUI with Dear ImGUI he can refer to the official website for the implementation: GitHub - ocornut/imgui: Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

1 Like