Fix tetris rendering
parent
fb8ee9fb11
commit
3acd00b403
|
@ -35,7 +35,7 @@ IN: tetris.gl
|
||||||
: scale-board ( width height board -- )
|
: scale-board ( width height board -- )
|
||||||
[ width>> ] [ height>> ] bi swapd [ / ] dup 2bi* 1 glScalef ;
|
[ width>> ] [ height>> ] bi swapd [ / ] dup 2bi* 1 glScalef ;
|
||||||
|
|
||||||
: (draw-tetris) ( width height tetris -- )
|
: draw-tetris ( width height tetris -- )
|
||||||
#! width and height are in pixels
|
#! width and height are in pixels
|
||||||
GL_MODELVIEW [
|
GL_MODELVIEW [
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,4 @@ IN: tetris.gl
|
||||||
[ next-piece draw-next-piece ]
|
[ next-piece draw-next-piece ]
|
||||||
[ current-piece draw-piece ]
|
[ current-piece draw-piece ]
|
||||||
} cleave
|
} cleave
|
||||||
] do-matrix ;
|
] do-matrix ;
|
||||||
|
|
||||||
: draw-tetris ( width height tetris -- )
|
|
||||||
origin get [ (draw-tetris) ] with-translation ;
|
|
Loading…
Reference in New Issue