mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-18 01:45:10 +03:00
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 <laurent.pinchart@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
33a0b14e0a
commit
583901a714
1 changed files with 1 additions and 3 deletions
|
@ -533,8 +533,6 @@ void ViewFinderGL::initializeGL()
|
||||||
/* Create Vertex Shader */
|
/* Create Vertex Shader */
|
||||||
if (!createVertexShader())
|
if (!createVertexShader())
|
||||||
qWarning() << "[ViewFinderGL]: create vertex shader failed.";
|
qWarning() << "[ViewFinderGL]: create vertex shader failed.";
|
||||||
|
|
||||||
glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewFinderGL::doRender()
|
void ViewFinderGL::doRender()
|
||||||
|
@ -821,7 +819,7 @@ void ViewFinderGL::paintGL()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image_) {
|
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);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
doRender();
|
doRender();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue