Next: Event Queues
Up: Basic User Interface
Previous: Application Structure
In polling,
- Value of input device constantly checked in a tight loop
- Wait for a change in status
Generally, polling is inefficient and should be avoided, particularly in
time-sharing systems.
In sampling, value of an input device is read and then the
program proceeds.
- No tight loop
- Typically used to track sequence of actions (the mouse)
CS488/688: Introduction to Interactive Computer Graphics
University of Waterloo
Computer Graphics Lab
cs488@cgl.uwaterloo.ca