Separation of the application and OpenGL window