mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 21:12:07 +08:00
visionipc connect, make sure opengl context is current
old-commit-hash: b67fed87baaa093dd6b82ec9b9f3733d745865f6
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user