protected override void OnRenderFrame(object sender, FrameEventArgs e) { if (!Enabled) { return; } GL.Clear(ClearBufferMask.ColorBufferBit); Matrix4 projection = MainWindow.GetProjection(Window.Width, Window.Height); _ampLines.Render(ref projection); GL.UseProgram(WaveProgram); GL.Uniform1(24, Time); _wave.Render(ref projection); _startButton.Render(ref projection); _circleL.Render(ref projection); _circleR.Render(ref projection); _freqSlider.Render(ref projection); _speedSlider.Render(ref projection); _freqText.Render(ref projection); _lengthText.Render(ref projection); _speedText.Render(ref projection); _timeSlipCheck.Render(ref projection); _timeSlipLabel.Render(ref projection); _startLabel.Render(ref projection); Window.SwapBuffers(); }
protected override void OnRenderFrame(object sender, FrameEventArgs e) { if (!Enabled) { return; } // Clear the used buffer to paint a new frame onto it GL.Clear(ClearBufferMask.ColorBufferBit); // Declare that we will use this program //GL.UseProgram(_window.ColoredProgram); // Get projection matrix and make shaders to compute with this matrix Matrix4 projection = GetProjection(); _line?.Render(ref projection); _freq1Slider.Render(ref projection); _freq2Slider.Render(ref projection); _timeSlider.Render(ref projection); freq1Text.Render(ref projection); freq2Text.Render(ref projection); ScreenTimeText.Render(ref projection); foreach (var button in _buttons.Values) { button.Render(ref projection); } _window.SwapBuffers(); }