in mujoco_py/mjrendercontext.pyx [0:0]
def _set_mujoco_buffers(self):
mjr_makeContext(self._model_ptr, &self._con, mjFONTSCALE_150)
if self.offscreen:
mjr_setBuffer(mjFB_OFFSCREEN, &self._con);
if self._con.currentBuffer != mjFB_OFFSCREEN:
raise RuntimeError('Offscreen rendering not supported')
else:
mjr_setBuffer(mjFB_WINDOW, &self._con);
if self._con.currentBuffer != mjFB_WINDOW:
raise RuntimeError('Window rendering not supported')
self.con = WrapMjrContext(&self._con)