class_docstr: A helper class to provide an OpenGL context. This context is global
  to the application.
class_docstr_tok: ["A","helper","class","to","provide","an","OpenGL","context",".","This","context","is","global","to","the","application","."]
docstr: Get a global context. Note that any assumptions about OpenGL state
  being local will not hold.
docstr_tok: ["Get","a","global","context",".","Note","that","any","assumptions","about","OpenGL","state","being","local","will","not","hold","."]
code: def get_global_instance(cls):
      """Get a global context. Note that any assumptions about OpenGL state
      being local will not hold.
      """
      if cls._global_instance is None:
          cls._global_instance = cls()
      return cls._global_instance
  
file_path: vispy/vispy/app/backends/_offscreen_util.py
imports: from ..None import Application, Canvas
  from ...None import gloo
label_desc: Use image node_id 1 for calling the OffscreenContext obj's underlying member method code with example usage: obj.get_global_instance(cls) and returns: cls