class_docstr: Offscreen rendering class with opengl context.
class_docstr_tok: ["Offscreen","rendering","class","with","opengl","context","."]
code: def __init__(self, model, data):
      # We must make GLContext before MjrContext
      width = model.vis.global_.offwidth
      height = model.vis.global_.offheight
      self._get_opengl_backend(width, height)
      self.opengl_context.make_current()
  
      super().__init__(model, data, offscreen=True)
  
imports: import collections
  import os
  import time
  from threading import Lock
  import glfw
  import imageio
  import mujoco
  import numpy
label_desc: Use image node_id 1 to create a new RenderContextOffscreen object from inherited base classes: RenderContext with example: obj = RenderContextOffscreen(model, data)