public MouseControl(SunflowerWindow poincareWindow) { PoincareWindow = poincareWindow; PoincareWindow.Mouse.ButtonDown += Mouse_ButtonDown; PoincareWindow.Mouse.ButtonUp += Mouse_ButtonUp; }
public KeyboardControl(SunflowerWindow poincareWindow) { SunflowerWindow = poincareWindow; SunflowerWindow.Keyboard.KeyDown += Keyboard_KeyDown; SunflowerWindow.Keyboard.KeyRepeat = true; }
public JoystickControl(JoystickDevice joystick, SunflowerWindow poincareWindow) { Joystick = joystick; SunflowerWindow = poincareWindow; Joystick.ButtonDown += Joystick_ButtonDown; Joystick.ButtonUp += Joystick_ButtonUp; }
static void Main(string[] args) { // graphicsMode = new GraphicsMode(GraphicsMode.Default.ColorFormat, GraphicsMode.Default.Depth, GraphicsMode.Default.Stencil, graphicsModeSamples); graphicsMode = new GraphicsMode(); // The 'using' idiom guarantees proper resource cleanup. // We request 30 UpdateFrame events per second, and unlimited // RenderFrame events (as fast as the computer can handle). using (SunflowerWindow game = new SunflowerWindow()) { game.Run(30.0); } }