diff options
| -rw-r--r-- | pugl/detail/x11_gl.c | 44 | 
1 files changed, 22 insertions, 22 deletions
| diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c index f78dbf3..969581b 100644 --- a/pugl/detail/x11_gl.c +++ b/pugl/detail/x11_gl.c @@ -115,6 +115,28 @@ puglX11GlConfigure(PuglView* view)  }  static PuglStatus +puglX11GlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose)) +{ +	PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; +	glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx); +	return PUGL_SUCCESS; +} + +static PuglStatus +puglX11GlLeave(PuglView* view, const PuglEventExpose* expose) +{ +	PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; + +	if (expose && surface->double_buffered) { +		glXSwapBuffers(view->impl->display, view->impl->win); +	} + +	glXMakeCurrent(view->impl->display, None, NULL); + +	return PUGL_SUCCESS; +} + +static PuglStatus  puglX11GlCreate(PuglView* view)  {  	PuglInternals* const    impl      = view->impl; @@ -176,28 +198,6 @@ puglX11GlDestroy(PuglView* view)  	return PUGL_SUCCESS;  } -static PuglStatus -puglX11GlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose)) -{ -	PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; -	glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx); -	return PUGL_SUCCESS; -} - -static PuglStatus -puglX11GlLeave(PuglView* view, const PuglEventExpose* expose) -{ -	PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; - -	if (expose && surface->double_buffered) { -		glXSwapBuffers(view->impl->display, view->impl->win); -	} - -	glXMakeCurrent(view->impl->display, None, NULL); - -	return PUGL_SUCCESS; -} -  PuglGlFunc  puglGetProcAddress(const char* name)  { | 
