mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-01 17:31:18 +00:00
Adds very low quality, race-condition infested video output.
This commit is contained in:
parent
a681576d6c
commit
a6ada129e8
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QOpenGLContext>
|
#include <QOpenGLContext>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
ScanTargetWidget::ScanTargetWidget(QWidget *parent) : QOpenGLWidget(parent) {}
|
ScanTargetWidget::ScanTargetWidget(QWidget *parent) : QOpenGLWidget(parent) {}
|
||||||
ScanTargetWidget::~ScanTargetWidget() {}
|
ScanTargetWidget::~ScanTargetWidget() {}
|
||||||
@ -17,6 +18,7 @@ void ScanTargetWidget::paintGL() {
|
|||||||
if(scanTarget) {
|
if(scanTarget) {
|
||||||
scanTarget->update(width(), height());
|
scanTarget->update(width(), height());
|
||||||
scanTarget->draw(width(), height());
|
scanTarget->draw(width(), height());
|
||||||
|
QTimer::singleShot(500, this, SLOT(update())); // TODO: obviously this is nonsense.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +30,7 @@ Outputs::Display::OpenGL::ScanTarget *ScanTargetWidget::getScanTarget() {
|
|||||||
makeCurrent();
|
makeCurrent();
|
||||||
if(!scanTarget) {
|
if(!scanTarget) {
|
||||||
scanTarget = std::make_unique<Outputs::Display::OpenGL::ScanTarget>(defaultFramebufferObject());
|
scanTarget = std::make_unique<Outputs::Display::OpenGL::ScanTarget>(defaultFramebufferObject());
|
||||||
|
QTimer::singleShot(500, this, SLOT(update())); // TODO: obviously this is nonsense.
|
||||||
}
|
}
|
||||||
return scanTarget.get();
|
return scanTarget.get();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user