(self, unused_max_width, unused_max_height)
Initialization this EGL context.
Initialization this EGL context.
Initialization this EGL context .
def _platform_init(self, unused_max_width, unused_max_height):
    """Initialization this EGL context."""
    num_configs = ctypes.c_long()
    config_size = 1
    config = EGL.EGLConfig()
    EGL.eglReleaseThread()
    EGL.eglChooseConfig(
        EGL_DISPLAY,
        EGL_ATTRIBUTES,
        ctypes.byref(config),
        config_size,
        num_configs)
    if num_configs.value < 1:
      raise RuntimeError(
          'EGL failed to find a framebuffer configuration that matches the '
          'desired attributes: {}'.format(EGL_ATTRIBUTES))
    EGL.eglBindAPI(EGL.EGL_OPENGL_API)
    self._context = EGL.eglCreateContext(
        EGL_DISPLAY, config, EGL.EGL_NO_CONTEXT, None)
    if not self._context:
      raise RuntimeError('Cannot create an EGL context.')
def _platform_init ( self , unused_max_width , unused_max_height ) : num_configs = ctypes . c_long ( ) config_size = 1 config = EGL . EGLConfig ( ) EGL . eglReleaseThread ( ) EGL . eglChooseConfig ( EGL_DISPLAY , EGL_ATTRIBUTES , ctypes . byref ( config ) , config_size , num_configs ) if num_configs . value < 1 : raise RuntimeError ( 'EGL failed to find a framebuffer configuration that matches the ' 'desired attributes: {}' . format ( EGL_ATTRIBUTES ) ) EGL . eglBindAPI ( EGL . EGL_OPENGL_API ) self . _context = EGL . eglCreateContext ( EGL_DISPLAY , config , EGL . EGL_NO_CONTEXT , None ) if not self . _context : raise RuntimeError ( 'Cannot create an EGL context.' )