1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Switch to Qt-style member naming.

This commit is contained in:
Thomas Harte 2020-06-21 17:16:11 -04:00
parent 68d4d7d10a
commit b052ca5ca2
2 changed files with 5 additions and 5 deletions

View File

@ -21,18 +21,18 @@ void ScanTargetWidget::initializeGL() {
void ScanTargetWidget::paintGL() {
glClear(GL_COLOR_BUFFER_BIT);
if(scanTarget) {
vsync_predictor_.begin_redraw();
vsyncPredictor.begin_redraw();
scanTarget->update(width(), height());
scanTarget->draw(width(), height());
vsync_predictor_.end_redraw();
vsyncPredictor.end_redraw();
}
}
void ScanTargetWidget::vsync() {
vsync_predictor_.announce_vsync();
vsyncPredictor.announce_vsync();
const auto time_now = Time::nanos_now();
const auto delay_time = ((vsync_predictor_.suggested_draw_time() - time_now) / 1'000'000) - 5; // TODO: the extra 5 is a random guess.
const auto delay_time = ((vsyncPredictor.suggested_draw_time() - time_now) / 1'000'000) - 5; // TODO: the extra 5 is a random guess.
if(delay_time > 0) {
QTimer::singleShot(delay_time, this, SLOT(repaint()));
} else {

View File

@ -23,7 +23,7 @@ class ScanTargetWidget : public QOpenGLWidget
// This should be created only once there's an OpenGL context. So it
// can't be done at creation time.
std::unique_ptr<Outputs::Display::OpenGL::ScanTarget> scanTarget;
Time::VSyncPredictor vsync_predictor_;
Time::VSyncPredictor vsyncPredictor;
private slots:
void vsync();