UpdateFrame() public method

Updates frame logic.
public UpdateFrame ( double deltaTime ) : void
deltaTime double
return void
Example #1
0
        static void Main()
        {
            ProgramForm program = new ProgramForm("VoxelTerrain");
            program.Initialize();

            PerformanceTimer timer = new PerformanceTimer();

            MessagePump.Run(program, () =>
            {
                double deltaTime = timer.GetDeltaTime();

                if (program.WindowState != FormWindowState.Minimized)
                {
                    program.CheckInput(deltaTime);
                    program.UpdateFrame(deltaTime);
                    program.RenderFrame(deltaTime);
                }
            });

            program.DisposeFramework();
        }
Example #2
0
        static void Main()
        {
            ProgramForm program = new ProgramForm("VoxelTerrain");

            program.Initialize();

            PerformanceTimer timer = new PerformanceTimer();

            MessagePump.Run(program, () =>
            {
                double deltaTime = timer.GetDeltaTime();

                if (program.WindowState != FormWindowState.Minimized)
                {
                    program.CheckInput(deltaTime);
                    program.UpdateFrame(deltaTime);
                    program.RenderFrame(deltaTime);
                }
            });

            program.DisposeFramework();
        }