def _platform_free(self): """Frees resources associated with this context.""" if self._context and self._context == osmesa.OSMesaGetCurrentContext(): osmesa.OSMesaMakeCurrent(None, None, GL.GL_FLOAT, 0, 0) osmesa.OSMesaDestroyContext(self._context) self._buffer = None self._context = None
def doneglmesa(): global ctx if not (ctx is None): osmesa.OSMesaDestroyContext(ctx)