From 6fd87b747c445a9736a2c68206320113f6ad3d2e Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 10 Dec 2008 00:55:33 -0600 Subject: [PATCH] windows offscreen tweaks --- basis/ui/windows/windows.factor | 4 ++-- basis/windows/opengl32/opengl32.factor | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 basis/windows/opengl32/opengl32.factor diff --git a/basis/ui/windows/windows.factor b/basis/ui/windows/windows.factor index 145cba82a3..23d4104778 100755 --- a/basis/ui/windows/windows.factor +++ b/basis/ui/windows/windows.factor @@ -482,7 +482,7 @@ M: windows-ui-backend do-events f msg-obj set-global ; : setup-pixel-format ( hdc flags -- ) - 16 make-pfd [ ChoosePixelFormat dup win32-error=0/f ] 2keep + 32 make-pfd [ ChoosePixelFormat dup win32-error=0/f ] 2keep swapd SetPixelFormat win32-error=0/f ; : get-dc ( hWnd -- hDC ) GetDC dup win32-error=0/f ; @@ -516,7 +516,7 @@ M: win-base flush-gl-context ( handle -- ) [ nip 1 swap set-BITMAPINFOHEADER-biPlanes ] [ nip 32 swap set-BITMAPINFOHEADER-biBitCount ] [ nip BI_RGB swap set-BITMAPINFOHEADER-biCompression ] - [ [ first2 * 4 * ] dip swap set-BITMAPINFOHEADER-biSizeImage ] + [ [ first2 * 4 * ] dip set-BITMAPINFOHEADER-biSizeImage ] [ nip 72 swap set-BITMAPINFOHEADER-biXPelsPerMeter ] [ nip 72 swap set-BITMAPINFOHEADER-biYPelsPerMeter ] [ nip 0 swap set-BITMAPINFOHEADER-biClrUsed ] diff --git a/basis/windows/opengl32/opengl32.factor b/basis/windows/opengl32/opengl32.factor old mode 100644 new mode 100755 index c09b30164f..63384e8858 --- a/basis/windows/opengl32/opengl32.factor +++ b/basis/windows/opengl32/opengl32.factor @@ -74,7 +74,7 @@ IN: windows.opengl32 : windowed-pfd-dwFlags ( -- n ) { PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER } flags ; : offscreen-pfd-dwFlags ( -- n ) - { PFD_DRAW_TO_BITMAP PFD_SUPPORT_OPENGL PFD_SUPPORT_GDI } flags ; + { PFD_DRAW_TO_BITMAP PFD_SUPPORT_OPENGL } flags ; ! TODO: compare to http://www.nullterminator.net/opengl32.html : make-pfd ( flags bits -- pfd ) -- 2.34.1