A display window that uses OpenGL (via OpenTK) to render the game display.
Developed primarily by Alex Karantza ([email protected]), with some adjustments to fit into the application. Copyright transferred with permission to Ed Ropple and code included under the Sharplike License (CPAL).
Наследование: Sharplike.Core.Rendering.AbstractWindow
Пример #1
0
        public TKInputProvider()
        {
            TKRenderSystem rsys = (TKRenderSystem)Game.RenderSystem;
            win = (TKWindow)rsys.Window;

            win.Control.MouseMove += new MouseEventHandler(Form_MouseMove);
            win.Control.KeyDown += new KeyEventHandler(Form_KeyDown);
            win.Control.KeyUp += new KeyEventHandler(Form_KeyUp);
            win.Control.MouseDown += new MouseEventHandler(Form_MouseDown);
            win.Control.MouseUp += new MouseEventHandler(Form_MouseUp);
            win.Control.MouseWheel += new MouseEventHandler(Form_MouseWheel);
        }
Пример #2
0
 public override AbstractWindow CreateWindow(Size displayDimensions, GlyphPalette palette, Object context)
 {
     if (win == null)
         win = new TKWindow(displayDimensions, palette, context as Control);
     return win;
 }