From 583901a714d50adf28f248ccdad5867050979058 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 9 Sep 2024 17:14:51 +0300 Subject: qcam: viewfinder_gl: Drop duplicate glClearColor() There's no need to call glClearColor() twice before drawing any GL content. Drop the first call. This doesn't introduce any functional change. While at it, pass floats instead of doubles to glClearColor(), as required by the function. Signed-off-by: Laurent Pinchart Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham --- src/apps/qcam/viewfinder_gl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/apps') diff --git a/src/apps/qcam/viewfinder_gl.cpp b/src/apps/qcam/viewfinder_gl.cpp index 5be7bec5..b2096faf 100644 --- a/src/apps/qcam/viewfinder_gl.cpp +++ b/src/apps/qcam/viewfinder_gl.cpp @@ -533,8 +533,6 @@ void ViewFinderGL::initializeGL() /* Create Vertex Shader */ if (!createVertexShader()) qWarning() << "[ViewFinderGL]: create vertex shader failed."; - - glClearColor(1.0f, 1.0f, 1.0f, 0.0f); } void ViewFinderGL::doRender() @@ -821,7 +819,7 @@ void ViewFinderGL::paintGL() } if (image_) { - glClearColor(0.0, 0.0, 0.0, 1.0); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); doRender(); -- cgit v1.2.1