Пример #1
0
        protected override void OnResize(EventArgs e)
        {
            camera.SetSize(ClientSize.Width, ClientSize.Height);

            UnloadFactory.Set(ref gBuffer, new DeferredGBuffer(Width, Height));

            //screenCenter = new Point(Bounds.Left + (Bounds.Width / 2), Bounds.Top + (Bounds.Height / 2));
            //windowCenter = new Point(Width / 2, Height / 2);

            Debug.Info("...");
        }
Пример #2
0
        public EngineMain()
            : base(1400, 900,
                   new GraphicsMode(), "MyEngine", GameWindowFlags.Default,
                   DisplayDevice.Default, 3, 2,
                   GraphicsContextFlags.ForwardCompatible | GraphicsContextFlags.Debug)
        {
            instance = this;
            System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.High;

            VSync = VSyncMode.Off;

            Texture2D.InitTexture2D();
            UnloadFactory.Set(ref ubo, new UniformBlock());
            new PhysicsUsage.PhysicsManager();
        }