Does GLFW support adding a button in a window?

If support, how to add a button in a window ?

if button can be added, click button with mouse, some action can be done.

Whilst GLFW itself doesn’t have functions for adding a button, you can draw one with OpenGL or Vulkan and use GLFW for the mouse and keyboard events.

There are helper libraries for this, for example dear imgui is very popular, fast and functional (I use this myself), or NanoGUI.

3 Likes