Пример #1
0
        /// <summary>
        /// CoreApplication constructor
        /// </summary>
        /// <param name="width">Width of the window</param>
        /// <param name="height">Height of the window</param>
        /// <param name="title">Title of the window</param>
        /// <param name="fullscreen">Should this window by fullscreen</param>
        /// <param name="vsync">Should this windows use vsync</param>
        public CoreApplication(uint width = 800, uint height = 600, string title = "Core Application", bool fullscreen = false, bool vsync = true) : base((int)width, (int)height, OpenTK.Graphics.GraphicsMode.Default, title, fullscreen?GameWindowFlags.Fullscreen:GameWindowFlags.Default)
        {
            this._width      = width;
            this._height     = height;
            this._title      = title;
            this._fullscreen = fullscreen;
            this._vsync      = vsync;

            _params = new CoreApplicationCreationParams()
            {
                Width      = width,
                Height     = height,
                Title      = title,
                Fullscreen = fullscreen,
                VSync      = vsync
            };

            CoreEngine.CurrentApplication = this;
        }
Пример #2
0
 /// <summary>
 /// CoreApplication constructor
 /// </summary>
 /// <param name="param">Params of the window, see CoreApplicationCreationParams for values</param>
 public CoreApplication(CoreApplicationCreationParams param) : this(param.Width, param.Height, param.Title, param.Fullscreen, param.VSync)
 {
 }