Very simple. That's zero lines of code inside the OpenGL render loop. When the program starts it makes the assumption that the pad is perpendicular to your line-of-sight. An accelerometer/gyro thread fills the line-of-sight delta coordinates for the transformation matrix.