Example #1
0
 public Game()
 {
     _graphicsDevice         = new GraphicsDeviceGL(this);
     _gameWindow             = new GLGameWindow(this, _graphicsDevice);
     _stage                  = new _Stage(this);
     _gameTime               = new GameTime();
     _gameTime.TotalGameTime = TimeSpan.Zero;
     _lastGameTime           = DateTime.Now;
 }
Example #2
0
        public GLGameWindow(Game game, GraphicsDeviceGL graphicsDevice)
        {
            _game           = game;
            _graphicsDevice = graphicsDevice;
            _form           = new System.Windows.Forms.Form()
            {
                MaximizeBox = false,
            };

            _form.ClientSize = new System.Drawing.Size(720, 540);

            _form.Controls.Add(graphicsDevice.glControl);

            _form.Load   += _form_Load;
            _form.Resize += _form_Resize;
            _form.Shown  += _form_Shown;
        }