Are there any resources for writing a GUI in OpenGL


I am interested in creating a generic GUI framework in OpenGL. Basically I want to be able to create a user interface similar to the one in Blender or any 3D modeling program.
I have searched quite a bit but haven’t found a good resource for how to program a GUI with a graphics library.

For instance, I understand the concept of drawing buttons and check boxes etc. but I can’t find any resources on how store state, or how to execute callback functions when a button is clicked etc.

I am wondering if there are any guides for this type of thing.

I would be very interested if anyone has any resources for this type of thing.


Things like “how store state” and “how to execute callback functions when a button is clicked” are just programming. Not graphics programming, not GUI programming; they’re just programming.

Take the callback example. The GUI part of your program is the one that registers that a button was clicked. How you get that information to whomever is supposed to respond to it is just regular programming. Functionally, it’s no different than the code you’d write to execute a callback when a user typed something in on the command line.

These are all different programming tasks, with different possible implementations that each have their own tradeoffs. You’re probably not going to find a tutorial on GUI programming; you have to research each possible implementation independently of the rest.