visionipc connect, make sure opengl context is current

old-commit-hash: b67fed87baaa093dd6b82ec9b9f3733d745865f6
This commit is contained in:
Willem Melching
2021-01-19 14:49:40 +01:00
parent 0372aa500d
commit 749b4ab508
+5 -1
View File
@@ -243,6 +243,11 @@ void GLWindow::backlightUpdate() {
}
void GLWindow::timerUpdate() {
// Connecting to visionIPC requires opengl to be current
if (!ui_state.vipc_client->connected){
makeCurrent();
}
if (ui_state.started != onroad) {
onroad = ui_state.started;
emit offroadTransition(!onroad);
@@ -262,7 +267,6 @@ void GLWindow::paintGL() {
if(GLWindow::ui_state.awake){
ui_draw(&ui_state);
}
}
void GLWindow::wake() {