protected override void OnUpdateFrame(FrameEventArgs e) { var measure = _renderMeasurer.Measure(); base.OnUpdateFrame(e); UpdateTick((float)e.Time); _updateMeasurer.Sample(measure); }
protected override void OnRenderFrame(FrameEventArgs e) { var measure = _renderMeasurer.Measure(); base.OnRenderFrame(e); GL.Clear(ClearBufferMask.ColorBufferBit); if (Camera.UpdateMatrices()) { var viewMatrix = Camera.ViewMatrix; GL.MatrixMode(MatrixMode.Modelview); GL.LoadMatrix(ref viewMatrix); var projectionMatrix = Camera.ProjectionMatrix; GL.MatrixMode(MatrixMode.Projection); GL.LoadMatrix(ref projectionMatrix); } RenderTick((float)e.Time); SwapBuffers(); _renderMeasurer.Sample(measure); }