'Set go_fast=True to run at full speed instead of waiting for the 60 Hz monitor refresh
init_width and init_height set window size. On Mac Retina displays, they are in nominal
pixels but .render returns an array of device pixels, so the array will be twice as big
as you expect.'

def __init__(self, visible=True, init_width=500, init_height=500, go_fast=False):

    self.visible = visible
    self.init_width = init_width
    self.init_height = init_height
    self.go_fast = ((not visible) or go_fast)
    self.last_render_time = 0
    self.objects = mjcore.MJVOBJECTS()
    self.cam = mjcore.MJVCAMERA()
    self.vopt = mjcore.MJVOPTION()
    self.ropt = mjcore.MJROPTION()
    self.con = mjcore.MJRCONTEXT()
    self.running = False
    self.speedtype = 1
    self.window = None
    self.model = None
    self.gui_lock = Lock()
    self._fbo = None
    self._rbo = None
    self._last_button = 0
    self._last_click_time = 0
    self._button_left_pressed = False
    self._button_middle_pressed = False
    self._button_right_pressed = False
    self._last_mouse_x = 0
    self._last_mouse_y = 0
