andyborrell / imgui_tex_inspect

A texture inspector tool for Dear ImGui
MIT License
85 stars 18 forks source link

Use own embedded OpenGL loader #3

Open moritz-h opened 2 years ago

moritz-h commented 2 years ago

Replace the OpenGL loading defines by an own minimal embedded OpenGL loader. This is the same as upstream imgui is doing now, see https://github.com/ocornut/imgui/issues/4445.

The changes to tex_inspect_opengl.cpp are taken from the upstream imgui repo. The loader is generated with the command:

./gl3w_gen.py --output ../imgui_tex_inspect/backends/tex_inspect_opengl_loader.h --ref ../imgui_tex_inspect/backends/tex_inspect_opengl.cpp ./extra_symbols.txt --symbolprefix imtexin_

There is a patch needed for gl3w_gen.py to allow overwriting the symbol prefix to avoid conflicts with the loader used by imgui itself, a PR with that feature is here: https://github.com/dearimgui/gl3w_stripped/pull/1