UI: always clear CameraView background (#23231)

* fix background

* gate that with Hardware::EON

* always call glclear
This commit is contained in:
Dean Lee
2021-12-16 03:13:50 +08:00
committed by GitHub
parent 472177e2a8
commit 5810583d57
+4 -5
View File
@@ -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());