How to detect and handling a zooming gesture in OpenGL 3D world

This code describe how to handling zooming gesture.