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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user