[ 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
double-buffered
T{ depth-bits { value 16 } }
} }
+ { pref-dim { 640 480 } }
} ;
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>
backing-store
T{ depth-bits f 24 }
} >>pixel-format-attributes
+ { 512 512 } >>pref-dim
f swap open-window* ;
: into-window ( world quot -- world )