OpenGL window, event, and gui routines