     reflection-framebuffer reflection-depthbuffer
     reflection-texture ;
 
-M: spheres-world near-plane ( gadget -- z )
+M: spheres-world near-plane
     drop 1.0 ;
-M: spheres-world far-plane ( gadget -- z )
+M: spheres-world far-plane
     drop 512.0 ;
-M: spheres-world distance-step ( gadget -- dz )
+M: spheres-world distance-step
     drop 0.5 ;
 
 : (reflection-dim) ( -- w h )

        [ plane-program>> [ delete-gl-program ] when* ]
    } cleave ;

M: spheres-world pref-dim* ( gadget -- dim )
    drop { 640 480 } ;

:: (draw-sphere) ( program center radius -- )
    program "center" glGetAttribLocation center first3 glVertexAttrib3f
    program "radius" glGetAttribLocation radius glVertexAttrib1f
    { -1.0 -1.0 } { 1.0 1.0 } rect-vertices ;
    
:: (draw-colored-sphere) ( program center radius surfacecolor -- )
    program "surface_color" glGetAttribLocation surfacecolor first4 glVertexAttrib4f

    } cleave ] with-framebuffer ;

M: spheres-world draw-world*
    {
        [ (draw-reflection-texture) ]
        [ demo-world-set-matrix ]
        [ sphere-scene ]
