]> gitweb.factorcode.org Git - factor.git/commitdiff
use world-attributes pref-dim instead of world pref-dim* method where applicable
authorJoe Groff <arcata@gmail.com>
Sat, 16 Jan 2010 19:44:58 +0000 (11:44 -0800)
committerJoe Groff <arcata@gmail.com>
Sat, 16 Jan 2010 19:44:58 +0000 (11:44 -0800)
extra/spheres/spheres.factor
extra/ui/gadgets/worlds/null/null.factor

index de969e47b63a520cfd20672a1d8a54039a2676b4..819dbe892e861613e18f3d92cf55181b3252870d 100644 (file)
@@ -196,9 +196,6 @@ M: spheres-world end-world
         [ plane-program>> [ delete-gl-program ] when* ]
     } cleave ;
 
-M: spheres-world pref-dim*
-    drop { 640 480 } ;
-
 :: (draw-sphere) ( program center radius -- )
     program "center" glGetAttribLocation center first3 glVertexAttrib3f
     program "radius" glGetAttribLocation radius glVertexAttrib1f
@@ -307,4 +304,5 @@ MAIN-WINDOW: spheres-window {
             double-buffered
             T{ depth-bits { value 16 } }
         } }
+        { pref-dim { 640 480 } }
     } ;
index 0f116f0d51fe6c52c9e411d38ff9923d7ee9aebf..eb0e1c1d5c5fde0f8a8b3e50a96c4c3b09e69605 100644 (file)
@@ -7,7 +7,6 @@ M: null-world begin-world drop ;
 M: null-world end-world drop ;
 M: null-world draw-world* drop ;
 M: null-world resize-world drop ;
-M: null-world pref-dim* drop { 512 512 } ;
 
 : null-window ( title -- world )
     <world-attributes>
@@ -19,6 +18,7 @@ M: null-world pref-dim* drop { 512 512 } ;
             backing-store
             T{ depth-bits f 24 }
         } >>pixel-format-attributes
+        { 512 512 } >>pref-dim
     f swap open-window* ;
 
 : into-window ( world quot -- world )