class_docstr: Render context superclass for offscreen and window rendering.
class_docstr_tok: ["Render","context","superclass","for","offscreen","and","window","rendering","."]
code: def _set_mujoco_buffers(self):
      if self.offscreen:
          mujoco.mjr_setBuffer(
              mujoco.mjtFramebuffer.mjFB_OFFSCREEN, self.con
          )
          if (
              self.con.currentBuffer
              != mujoco.mjtFramebuffer.mjFB_OFFSCREEN
          ):
              raise RuntimeError("Offscreen rendering not supported")
      else:
          mujoco.mjr_setBuffer(
              mujoco.mjtFramebuffer.mjFB_WINDOW, self.con
          )
          if (
              self.con.currentBuffer
              != mujoco.mjtFramebuffer.mjFB_WINDOW
          ):
              raise RuntimeError("Window rendering not supported")
  
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 2 for calling the RenderContext obj's underlying member method code with example usage: obj._set_mujoco_buffers() without return types