Fixed creating OpenGL resources using multi thread.