visionipc connect, make sure opengl context is current

pull/19841/head
Willem Melching 4 years ago
parent d7532cf981
commit b67fed87ba
  1. 6
      selfdrive/ui/qt/home.cc

@ -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() {

Loading…
Cancel
Save