Tweak windows and x11 backends to work with changes made for offscreen rendering
parent
98c0daae2a
commit
4f6ed727d0
|
@ -498,10 +498,10 @@ M: windows-ui-backend (open-window) ( world -- )
|
||||||
dupd (>>handle)
|
dupd (>>handle)
|
||||||
hWnd>> show-window ;
|
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 ;
|
[ 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 ;
|
hDC>> SwapBuffers win32-error=0/f ;
|
||||||
|
|
||||||
! Move window to front
|
! Move window to front
|
||||||
|
|
|
@ -248,12 +248,12 @@ M: x11-ui-backend raise-window* ( world -- )
|
||||||
dpy get swap window>> XRaiseWindow drop
|
dpy get swap window>> XRaiseWindow drop
|
||||||
] when* ;
|
] when* ;
|
||||||
|
|
||||||
M: x11-ui-backend select-gl-context ( handle -- )
|
M: x11-handle select-gl-context ( handle -- )
|
||||||
dpy get swap
|
dpy get swap
|
||||||
dup window>> swap glx>> glXMakeCurrent
|
dup window>> swap glx>> glXMakeCurrent
|
||||||
[ "Failed to set current GLX context" throw ] unless ;
|
[ "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 ;
|
dpy get swap window>> glXSwapBuffers ;
|
||||||
|
|
||||||
M: x11-ui-backend ui ( -- )
|
M: x11-ui-backend ui ( -- )
|
||||||
|
|
Loading…
Reference in New Issue