add rgl.open() before rgl.surface() to avoid 'segfault' problem