Add codes learned from SimpleViewer of OpenNI2. It can create a window now.