*** empty log message ***
parent
7e5bf6fc0c
commit
880a7ca5cf
|
@ -1,11 +1,9 @@
|
||||||
USING: kernel sequences namespaces math threads io opengl concurrency
|
USING: kernel sequences namespaces math threads io opengl concurrency
|
||||||
x xlib x11 gl concurrent-widgets ;
|
x xlib x11 gl concurrent-widgets ;
|
||||||
|
|
||||||
SYMBOL: loop-action
|
SYMBOL: loop-action [ ] loop-action set
|
||||||
[ ] loop-action set
|
|
||||||
|
|
||||||
SYMBOL: spin
|
SYMBOL: spin 0.0 spin set
|
||||||
0.0 spin set
|
|
||||||
|
|
||||||
: init ( -- ) 0.0 0.0 0.0 0.0 glClearColor GL_FLAT glShadeModel ;
|
: init ( -- ) 0.0 0.0 0.0 0.0 glClearColor GL_FLAT glShadeModel ;
|
||||||
|
|
||||||
|
@ -20,8 +18,7 @@ swap-buffers ;
|
||||||
|
|
||||||
: spin-display ( -- )
|
: spin-display ( -- )
|
||||||
spin get 2.0 + spin set
|
spin get 2.0 + spin set
|
||||||
spin get 360.0 > [ spin get 360.0 - spin set ] when
|
spin get 360.0 > [ spin get 360.0 - spin set ] when display ;
|
||||||
display ;
|
|
||||||
|
|
||||||
: reshape ( { width height } -- )
|
: reshape ( { width height } -- )
|
||||||
>r 0 0 r> [ ] each glViewport
|
>r 0 0 r> [ ] each glViewport
|
||||||
|
@ -49,9 +46,4 @@ StructureNotifyMask ButtonPressMask bitor select-input
|
||||||
|
|
||||||
[ GLX_RGBA GLX_DOUBLEBUFFER ] choose-visual create-context make-current
|
[ GLX_RGBA GLX_DOUBLEBUFFER ] choose-visual create-context make-current
|
||||||
|
|
||||||
init
|
init [ concurrent-event-loop ] spawn [ loop ] spawn
|
||||||
|
|
||||||
{ 250 250 } reshape
|
|
||||||
|
|
||||||
[ concurrent-event-loop ] spawn
|
|
||||||
[ loop ] spawn
|
|
Loading…
Reference in New Issue