Fix QVideoSurfaceArbFpPainter mistakenly failing to start in some cases.
If an OpenGL error occurred before starting the video painter, it would fail to do so. This patch simply makes sure the OpenGL error flag is cleared before checking for GL errors that would occur in QVideoSurfaceArbFpPainter's code. Change-Id: I2eacf6db03cb290adf00a9faf11145c7a6ade565 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
3111178ee6
commit
875de90ff8
@@ -773,6 +773,8 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::start(const QVideoSurfac
|
|||||||
if (!program) {
|
if (!program) {
|
||||||
error = QAbstractVideoSurface::UnsupportedFormatError;
|
error = QAbstractVideoSurface::UnsupportedFormatError;
|
||||||
} else {
|
} else {
|
||||||
|
while (glGetError() != GL_NO_ERROR) { } // clear previous unrelated errors
|
||||||
|
|
||||||
glGenProgramsARB(1, &m_programId);
|
glGenProgramsARB(1, &m_programId);
|
||||||
|
|
||||||
GLenum glError = glGetError();
|
GLenum glError = glGetError();
|
||||||
|
|||||||
Reference in New Issue
Block a user