drag = mouse press + mouse move (before mouse release) ◼ Check mouse is keep pressed and then check it moves. ◼ ToDo ◼ Prepare a bool (global variable) to represent whether mouse button is pressed or not ◼ If button is pressed, set the bool as “true”. If button is released, set the button as “false”. ◼ If cursor position callback is called while the button is pressed, then the event is “drag”. Computer Graphics Course @Waseda University 10