(self, max_width, max_height)
Initializes this OSMesa context.
Initializes this OSMesa context.
Initializes this OSMesa context .
def _platform_init(self, max_width, max_height):
    """Initializes this OSMesa context."""
    self._context = osmesa.OSMesaCreateContextExt(
        osmesa.OSMESA_RGBA,
        _DEPTH_BITS,
        _STENCIL_BITS,
        _ACCUM_BITS,
        None,  # sharelist
    )
    if not self._context:
      raise RuntimeError('Failed to create OSMesa GL context.')

    self._height = max_height
    self._width = max_width

    # Allocate a buffer to render into.
    self._buffer = arrays.GLfloatArray.zeros((max_height, max_width, 4))
def _platform_init ( self , max_width , max_height ) : self . _context = osmesa . OSMesaCreateContextExt ( osmesa . OSMESA_RGBA , _DEPTH_BITS , _STENCIL_BITS , _ACCUM_BITS , None , # sharelist ) if not self . _context : raise RuntimeError ( 'Failed to create OSMesa GL context.' ) self . _height = max_height self . _width = max_width # Allocate a buffer to render into. self . _buffer = arrays . GLfloatArray . zeros ( ( max_height , max_width , 4 ) )