From 3e1988f1498447f644e2698d8e7deab803588262 Mon Sep 17 00:00:00 2001 From: =?utf8?q?B=C3=A5rd=20Eirik=20Winther?= Date: Thu, 8 Aug 2013 11:31:21 +0000 Subject: [PATCH] qv4l2: fix black screen with opengl after capture MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- utils/qv4l2/capture-win-gl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/qv4l2/capture-win-gl.cpp b/utils/qv4l2/capture-win-gl.cpp index 6071410..c8238c5 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; } -- 2.7.4