From 4f6ed727d0b1bd7ead23699d5c4d283a33774d80 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Tue, 9 Dec 2008 10:19:14 -0800 Subject: [PATCH] Tweak windows and x11 backends to work with changes made for offscreen rendering --- basis/ui/windows/windows.factor | 4 ++-- basis/ui/x11/x11.factor | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/ui/windows/windows.factor b/basis/ui/windows/windows.factor index 1481287e95..f6f449625f 100755 --- a/basis/ui/windows/windows.factor +++ b/basis/ui/windows/windows.factor @@ -498,10 +498,10 @@ M: windows-ui-backend (open-window) ( world -- ) dupd (>>handle) hWnd>> show-window ; -M: windows-ui-backend select-gl-context ( handle -- ) +M: win select-gl-context ( handle -- ) [ hDC>> ] keep hRC>> wglMakeCurrent win32-error=0/f ; -M: windows-ui-backend flush-gl-context ( handle -- ) +M: win flush-gl-context ( handle -- ) hDC>> SwapBuffers win32-error=0/f ; ! Move window to front diff --git a/basis/ui/x11/x11.factor b/basis/ui/x11/x11.factor index b65236d1f9..6d6243449b 100755 --- a/basis/ui/x11/x11.factor +++ b/basis/ui/x11/x11.factor @@ -248,12 +248,12 @@ M: x11-ui-backend raise-window* ( world -- ) dpy get swap window>> XRaiseWindow drop ] when* ; -M: x11-ui-backend select-gl-context ( handle -- ) +M: x11-handle select-gl-context ( handle -- ) dpy get swap dup window>> swap glx>> glXMakeCurrent [ "Failed to set current GLX context" throw ] unless ; -M: x11-ui-backend flush-gl-context ( handle -- ) +M: x11-handle flush-gl-context ( handle -- ) dpy get swap window>> glXSwapBuffers ; M: x11-ui-backend ui ( -- )