performance enhancements

memory enhancements
prevent starting sensors more than once
fix for wifi lag issues
map scaling for huge buildings
This commit is contained in:
2016-10-01 10:21:15 +02:00
parent 833327bafd
commit 44f9b6ac80
16 changed files with 197 additions and 26 deletions

View File

@@ -108,14 +108,26 @@ void MapView3D::initializeGL() {
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
// start background update timer
timer.start(Settings::MapView::msPerFrame.ms(), this);
// OpenGL is now initialized
isGLInitialized = true;
}
void MapView3D::setVisible(bool visible) {
// inform parent
QOpenGLWidget::setVisible(visible);
if (!visible) {
// stop background update timer
timer.stop();
} else {
// start background update timer
timer.start(Settings::MapView3D::msPerFrame.ms(), this);
}
}
void MapView3D::paintGL() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
draw();