Paste: how do I run this?
Author: | typemore |
Mode: | factor |
Date: | Mon, 16 Aug 2010 04:23:00 |
Plain Text |
USING: colors game.loop game.worlds literals method-chains
ui.gadgets.worlds arrays multiline prettyprint kernel
math opengl opengl.gl opengl.glu opengl.demo-support
ui ui.gadgets ui.render ui.pixel-formats accessors ;
IN: gfx
TUPLE: min-world < game-world ;
M: min-world draw-world* ( gadget -- ) drop
1.0 0.3 0.72 1.0 <rgba> gl-clear ;
M: min-world begin-game-world ( gadget -- ) drop ;
M: min-world end-game-world ( gadget -- ) drop ;
AFTER: min-world resize-world drop ;
GAME: min-game {
{ world-class min-world }
{ title "Minimal" }
{ pixel-format-attributes
{
windowed
double-buffered
T{ depth-bits { value 24 } }
}
}
{ pref-dim { 640 480 } }
{ tick-interval-nanos $[ 60 fps ] }
} ;
New Annotation