GLUT supports simple cascading pop-up menus. They are designed to let a user select various modes within a program. The functionality is simple and minimalistic and is meant to be that way. Do not mistake GLUT’s pop-up menu facility with an attempt to create a full-featured user interface. glutCreateMenu creates a Menu in GLUT. The syntax of glutCreateMenu is
int glutCreateMenu(void (*func)(int value));
This function defines the callback that has to be called when a menu item was selected. This callback function has one parameter, the value. This function returns an
int
, this is the menu identifier. This identifier is needed when you would want to attach this menu as a submenu. This is illustrated in sample example later.
تعليقات: 0
إرسال تعليق