From ad8ecdfbb77f831f501667556ad93144f00f8db6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 May 2023 11:44:21 -0400 Subject: Windows: Share common drawing context code --- src/win_gl.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/win_gl.c') diff --git a/src/win_gl.c b/src/win_gl.c index 293dd9b..f707fc6 100644 --- a/src/win_gl.c +++ b/src/win_gl.c @@ -261,25 +261,20 @@ puglWinGlEnter(PuglView* view, const PuglExposeEvent* expose) return PUGL_FAILURE; } + const PuglStatus st = puglWinEnter(view, expose); wglMakeCurrent(view->impl->hdc, surface->hglrc); - - if (expose) { - BeginPaint(view->impl->hwnd, &view->impl->paint); - } - - return PUGL_SUCCESS; + return st; } static PuglStatus puglWinGlLeave(PuglView* view, const PuglExposeEvent* expose) { if (expose) { - EndPaint(view->impl->hwnd, &view->impl->paint); SwapBuffers(view->impl->hdc); } wglMakeCurrent(NULL, NULL); - return PUGL_SUCCESS; + return puglWinLeave(view, expose); } PuglGlFunc -- cgit v1.2.1