migrate to GLFW3
fix a bug of generating texture object