GLUI is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, using GLUT or FreeGLUT.
This change replaces GLUI_CB and the associated IDs and pointers with simply std::function<void(void)>. This allows for using C++ lambdas for GLUI callbacks, including std::bind.
For example:
new GLUI_Button( glui, "Quit", []() { printf("Exit\n"); exit(0); } );
This change replaces GLUI_CB and the associated IDs and pointers with simply
std::function<void(void)>
. This allows for using C++ lambdas for GLUI callbacks, includingstd::bind
.For example:
new GLUI_Button( glui, "Quit", []() { printf("Exit\n"); exit(0); } );