Matteo Bruni : wined3d: Flush the GL context before switching away from it.