Use OpenGL context locking as required