Cross-thread lambda functions fail on win32
Use QGLFunctions to fix OpenGL calls