Does GLFW support adding a button in a window?


#1

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


#2

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


#3

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.