Ejemplo n.º 1
0
Archivo: glx.cpp Proyecto: nyorain/ny
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_);
	}
}
Ejemplo n.º 2
0
Archivo: gl.cpp Proyecto: nyorain/ny
void GlContext::makeNotCurrent()
{
	std::error_code error;
	if(!makeNotCurrent(error)) throw std::system_error(error);
}
Ejemplo n.º 3
0
		WGLContextObj::~WGLContextObj()
		{
			makeNotCurrent();
			wglDeleteContext(openGLContext);
		}