]> gitweb.factorcode.org Git - factor.git/commitdiff
pardon my dust
authorJoe Groff <arcata@gmail.com>
Wed, 1 Jul 2009 22:57:21 +0000 (17:57 -0500)
committerJoe Groff <arcata@gmail.com>
Wed, 1 Jul 2009 22:57:21 +0000 (17:57 -0500)
basis/opengl/opengl.factor
basis/ui/gadgets/worlds/worlds.factor
basis/ui/ui.factor
extra/ui/gadgets/worlds/null/null.factor

index a56b72ada5c2bb3995588e68bef60decec9cc8f2..bb5847e734f84bdcff77c254311c26832e15696f 100644 (file)
@@ -154,7 +154,7 @@ MACRO: all-enabled-client-state ( seq quot -- )
 
 :: with-vertex-array ( id quot -- )
     id glBindVertexArray
-    quot [ binding 0 glBindVertexArray ] [ ] cleanup ; inline
+    quot [ 0 glBindVertexArray ] [ ] cleanup ; inline
 
 : <gl-buffer> ( target data hint -- id )
     pick gen-gl-buffer [
index 1766abba97c2ad0f9554e3f5f201214d866e02cc..ed21c85b19a315c1c8a8956ad53c2682c1f5f3e0 100755 (executable)
@@ -89,13 +89,13 @@ SYMBOL: context-world
 
 : with-gl-context ( world quot -- )
     '[ set-gl-context @ ]
-    [ flush-gl-context gl-error ] bi ; inline
+    [ handle>> flush-gl-context gl-error ] bi ; inline
 
 ERROR: no-world-found ;
 
 : find-gl-context ( gadget -- )
     find-world dup
-    [ handle>> set-gl-context ] [ no-world-found ] if ;
+    [ set-gl-context ] [ no-world-found ] if ;
 
 : (request-focus) ( child world ? -- )
     pick parent>> pick eq? [
@@ -164,8 +164,8 @@ M: world (>>dim)
     [ call-next-method ]
     [
         dup handle>>
-        [ set-gl-context resize-world ]
-        [ drop ] if*
+        [ [ set-gl-context ] [ resize-world ] bi ]
+        [ drop ] if
     ] bi ;
 
 GENERIC: draw-world* ( world -- )
@@ -199,7 +199,7 @@ ui-error-hook [ [ rethrow ] ] initialize
     dup draw-world? [
         dup world [
             [
-                dup handle>> [ draw-world* ] with-gl-context
+                dup [ draw-world* ] with-gl-context
                 flush-layout-cache-hook get call( -- )
             ] [
                 over <world-error> ui-error
index 9d1c40377f792509ab18f4da2ec50a661b8cbf8c..8ac2cdd36fa06383de6144e7480270ca5b74f3ab 100644 (file)
@@ -61,7 +61,7 @@ SYMBOL: windows
 
 : set-up-window ( world -- )
     {
-        [ handle>> set-gl-context ]
+        [ set-gl-context ]
         [ [ title>> ] keep set-title ]
         [ begin-world ]
         [ resize-world ]
@@ -89,13 +89,13 @@ M: world graft*
 
 : (ungraft-world) ( world -- )
     {
-        [ handle>> set-gl-context ]
+        [ set-gl-context ]
         [ text-handle>> [ dispose ] when* ]
         [ images>> [ dispose ] when* ]
         [ hand-clicked close-global ]
         [ hand-gadget close-global ]
         [ end-world ]
-        [ [ [ [ dispose ] when* ] each V{ } clone ] change-window-resources ]
+        [ [ [ [ dispose ] when* ] each V{ } clone ] change-window-resources drop ]
     } cleave ;
 
 M: world ungraft*
index 26fc3e8a94a274fd2c6444d6810a560a49f4bfee..0f116f0d51fe6c52c9e411d38ff9923d7ee9aebf 100644 (file)
@@ -22,6 +22,6 @@ M: null-world pref-dim* drop { 512 512 } ;
     f swap open-window* ;
 
 : into-window ( world quot -- world )
-    [ dup handle>> ] dip with-gl-context ; inline
+    [ dup ] dip with-gl-context ; inline