(PGraphicsOpenGL) Moved the open gl thread check ahead of a all that depended on being in the correct thread