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

db4
Joe Groff 2010-01-16 11:44:58 -08:00
parent 26cbbf1ec1
commit afadf303cd
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* ]
} 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 } }
} ;

View 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 )