Skip to content

Commit

Permalink
UI: always clear CameraView background (commaai#23231)
Browse files Browse the repository at this point in the history
* fix background

* gate that with Hardware::EON

* always call glclear
  • Loading branch information
deanlee authored Dec 15, 2021
1 parent 472177e commit 5810583
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions selfdrive/ui/qt/widgets/cameraview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,10 @@ void CameraViewWidget::updateFrameMat(int w, int h) {
}

void CameraViewWidget::paintGL() {
if (latest_texture_id == -1) {
glClearColor(bg.redF(), bg.greenF(), bg.blueF(), bg.alphaF());
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
return;
}
glClearColor(bg.redF(), bg.greenF(), bg.blueF(), bg.alphaF());
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);

if (latest_texture_id == -1) return;

glViewport(0, 0, width(), height());

Expand Down

0 comments on commit 5810583

Please sign in to comment.