From: Bård Eirik Winther Date: Mon, 5 Aug 2013 07:56:52 +0000 (+0000) Subject: qv4l2: fix black screen with opengl after capture X-Git-Tag: v4l-utils-1.2.0~424 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c1ee0137709ea1091c108ad771cf1a7c5b8a267;p=platform%2Fupstream%2Fv4l-utils.git qv4l2: fix black screen with opengl after capture Fixes the issue when the window was beeing resized/moved and the frame image would become black. Signed-off-by: Bård Eirik Winther Signed-off-by: Hans Verkuil --- diff --git a/utils/qv4l2/capture-win-gl.cpp b/utils/qv4l2/capture-win-gl.cpp index bae6569..edae60f 100644 --- a/utils/qv4l2/capture-win-gl.cpp +++ b/utils/qv4l2/capture-win-gl.cpp @@ -253,6 +253,12 @@ void CaptureWinGLEngine::paintGL() changeShader(); if (m_frameData == NULL) { + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0, 0); + glTexCoord2f(1.0f, 0.0f); glVertex2f(m_frameWidth, 0); + glTexCoord2f(1.0f, 1.0f); glVertex2f(m_frameWidth, m_frameHeight); + glTexCoord2f(0.0f, 1.0f); glVertex2f(0, m_frameHeight); + glEnd(); return; }