/// <summary> /// Setup OpenGL and load resources /// </summary> public void Init() { GL.ClearColor(Color.Black); _fontService = new FontService(); _fontService.InitializeTextures(); _fontService.UpdateScreenHeight(Height); _buttons = new ProfileButton[(int)ButtonIndex.Count]; _buttons[(int)ButtonIndex.TagTitle] = new ProfileButton(_fontService, () => SetSort(new ProfileSorters.TagAscending())); _buttons[(int)ButtonIndex.InstantTitle] = new ProfileButton(_fontService, () => SetSort(new ProfileSorters.InstantAscending())); _buttons[(int)ButtonIndex.AverageTitle] = new ProfileButton(_fontService, () => SetSort(new ProfileSorters.AverageAscending())); _buttons[(int)ButtonIndex.TotalTitle] = new ProfileButton(_fontService, () => SetSort(new ProfileSorters.TotalAscending())); _buttons[(int)ButtonIndex.Step] = new ProfileButton(_fontService, () => _doStep = true); _buttons[(int)ButtonIndex.FilterBar] = new ProfileButton(_fontService, () => { _profileUpdated = true; _regexEnabled = !_regexEnabled; }); _buttons[(int)ButtonIndex.ShowHideInactive] = new ProfileButton(_fontService, () => { _profileUpdated = true; _showInactive = !_showInactive; }); _buttons[(int)ButtonIndex.Pause] = new ProfileButton(_fontService, () => { _profileUpdated = true; _paused = !_paused; }); _buttons[(int)ButtonIndex.ToggleFlags] = new ProfileButton(_fontService, () => { _displayFlags = !_displayFlags; _redrawPending = true; }); _buttons[(int)ButtonIndex.ChangeDisplay] = new ProfileButton(_fontService, () => { _displayGraph = !_displayGraph; _redrawPending = true; }); Visible = _visible; }