use world-attributes pref-dim instead of world pref-dim* method where applicable

Joe Groff 2010-01-16 11:44:58 -08:00
parent bf7f0d05b2
commit 728b6f19e5
2 changed files with 2 additions and 4 deletions

View File

@ -196,9 +196,6 @@ M: spheres-world end-world
[ plane-program>> [ delete-gl-program ] when* ] [ plane-program>> [ delete-gl-program ] when* ]
} cleave ; } cleave ;
M: spheres-world pref-dim*
drop { 640 480 } ;
:: (draw-sphere) ( program center radius -- ) :: (draw-sphere) ( program center radius -- )
program "center" glGetAttribLocation center first3 glVertexAttrib3f program "center" glGetAttribLocation center first3 glVertexAttrib3f
program "radius" glGetAttribLocation radius glVertexAttrib1f program "radius" glGetAttribLocation radius glVertexAttrib1f
@ -307,4 +304,5 @@ MAIN-WINDOW: spheres-window {
double-buffered double-buffered
T{ depth-bits { value 16 } } T{ depth-bits { value 16 } }
} } } }
{ pref-dim { 640 480 } }
} ; } ;

View File

@ -7,7 +7,6 @@ M: null-world begin-world drop ;
M: null-world end-world drop ; M: null-world end-world drop ;
M: null-world draw-world* drop ; M: null-world draw-world* drop ;
M: null-world resize-world drop ; M: null-world resize-world drop ;
M: null-world pref-dim* drop { 512 512 } ;
: null-window ( title -- world ) : null-window ( title -- world )
<world-attributes> <world-attributes>
@ -19,6 +18,7 @@ M: null-world pref-dim* drop { 512 512 } ;
backing-store backing-store
T{ depth-bits f 24 } T{ depth-bits f 24 }
} >>pixel-format-attributes } >>pixel-format-attributes
{ 512 512 } >>pref-dim
f swap open-window* ; f swap open-window* ;
: into-window ( world quot -- world ) : into-window ( world quot -- world )