lab6 - window. Adding an entry to the menu • After...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Input processing & popup menus Computer Graphics Lab 04
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Contents Popup menus. Mouse input processing. Keyboard input processing. Updating the Display. Lab exercise.
Background image of page 2
The popup menu A useful functionality we would like our application to have is called context or popup menu. The GLUT has an event also for that. The GLUT command for creating a menu and registering this event’s callback function Is: int glutCreateMenu( void (*func) (int value) ); func - The callback function for the menu Notes: The menu is defined for the active window. When moving between windows, the menu is changes according to the active
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 14
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: window. Adding an entry to the menu • After creating a new menu we have to add items: void glutAddMenuEntry( char *name, int value ); name – an ACSII character string to display in the menu entry. value – a value to return to the menu’s callback function if the menu entry is selected. Attach a Mouse Button Event to the Current Menu Pop up menu pseudo code example Mouse Button Input Mouse Button Input example Mouse Motion Input Mouse Motion Input example Keyboard Input Special Keyboard Input Updating the Display Keyboard Input example...
View Full Document

This note was uploaded on 04/14/2011 for the course CS 61118 taught by Professor Alexfrid during the Fall '11 term at Technion.

Page1 / 14

lab6 - window. Adding an entry to the menu • After...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online