Exemplo n.º 1
0
 protected override void OnLoad(EventArgs e)
 {
     CursorVisible = true;
     Initialize();
     RenderingSystem.Initialize();
     RenderingSystem.SetClearColor(Color.Black);
 }
Exemplo n.º 2
0
        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            RenderingSystem.Update();
            Input.Update();
            Update();

            if (Input.GetKeyDown(Key.F10))
            {
                RenderingSystem.Wiremode = !RenderingSystem.Wiremode;
            }
        }
Exemplo n.º 3
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            VSync = Settings.VSync ? VSyncMode.On : VSyncMode.Off;
            Title = $"BrickEngine VSync: ({VSync.ToString()}) FPS: ({1f / e.Time:0}) Limit FPS: ({Settings.Framerate}) - UNLICENSED VERSION";

            var projection = Matrix4.CreateOrthographicOffCenter(0, Width, Height, 0, 0, 1);

            GL.MatrixMode(MatrixMode.Projection);
            GL.LoadMatrix(ref projection);

            RenderingSystem.ClearScreen();
            RenderingSystem.RunConfiguration();
            Render();
            SwapBuffers();
        }