glXMakeContextCurrent(display, None, None, 0);
if( glx_ctx ) glXDestroyContext(display, glx_ctx);
if( glx_win ) glXDestroyWindow(display, glx_win);
glXMakeContextCurrent(display, None, None, 0);
if( glx_ctx ) glXDestroyContext(display, glx_ctx);
if( glx_win ) glXDestroyWindow(display, glx_win);