GlxContext::~GlxContext() { if(glxContext_) { std::error_code ec; if(!makeNotCurrent(ec)) warning("ny::~GlxContext: failed to make the context not current: ", ec.message()); ::glXDestroyContext(xDisplay(), glxContext_); } }
void GlContext::makeNotCurrent() { std::error_code error; if(!makeNotCurrent(error)) throw std::system_error(error); }
WGLContextObj::~WGLContextObj() { makeNotCurrent(); wglDeleteContext(openGLContext); }