]> gitweb.factorcode.org Git - factor.git/commitdiff
windows offscreen tweaks
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 10 Dec 2008 06:55:33 +0000 (00:55 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 10 Dec 2008 06:55:33 +0000 (00:55 -0600)
basis/ui/windows/windows.factor
basis/windows/opengl32/opengl32.factor [changed mode: 0644->0755]

index 145cba82a3b28296d3a4eec07258d20a251beb60..23d410477899ef82854c1a181d1267bc4f7e5369 100755 (executable)
@@ -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 ]
old mode 100644 (file)
new mode 100755 (executable)
index c09b301..63384e8
@@ -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 )