(self, width, height, title, context=None)
Instance initializer.

    Args:
      width: Initial window width, in pixels.
      height: Initial window height, in pixels.
      title: A string with a window title.
      context: (Optional) A `render.GLFWContext` instance.

    Raises:
      RuntimeError: If GLFW initialization or window initialization fails.
Instance initializer.
Instance initializer .
def __init__(self, width, height, title, context=None):
    """Instance initializer.

    Args:
      width: Initial window width, in pixels.
      height: Initial window height, in pixels.
      title: A string with a window title.
      context: (Optional) A `render.GLFWContext` instance.

    Raises:
      RuntimeError: If GLFW initialization or window initialization fails.
    """
    super().__init__()
    self._context = context or DoubleBufferedGlfwContext(width, height, title)

    if not self._context.window:
      raise RuntimeError('Failed to create window')

    self._oldsize = None

    with self._context.make_current() as ctx:
      self._fullscreen_quad = ctx.call(self._glfw_setup, self._context.window)
    self.on_files_drop = util.QuietSet()

    self._keyboard = GlfwKeyboard(self._context)
    self._mouse = GlfwMouse(self._context)
def __init__ ( self , width , height , title , context = None ) : super ( ) . __init__ ( ) self . _context = context or DoubleBufferedGlfwContext ( width , height , title ) if not self . _context . window : raise RuntimeError ( 'Failed to create window' ) self . _oldsize = None with self . _context . make_current ( ) as ctx : self . _fullscreen_quad = ctx . call ( self . _glfw_setup , self . _context . window ) self . on_files_drop = util . QuietSet ( ) self . _keyboard = GlfwKeyboard ( self . _context ) self . _mouse = GlfwMouse ( self . _context )