diff options
Diffstat (limited to 'src/gui/opengl/qopenglbuffer.cpp')
-rw-r--r-- | src/gui/opengl/qopenglbuffer.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp index b832cefd70..a4c1e538ee 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/gui/opengl/qopenglbuffer.cpp @@ -333,18 +333,20 @@ void QOpenGLBuffer::destroy() bool QOpenGLBuffer::read(int offset, void *data, int count) { #if !defined(QT_OPENGL_ES) - Q_D(QOpenGLBuffer); - if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id()) - return false; - while (glGetError() != GL_NO_ERROR) ; // Clear error state. - d->funcs->glGetBufferSubData(d->type, offset, count, data); - return glGetError() == GL_NO_ERROR; + if (QOpenGLFunctions::platformGLType() != QOpenGLFunctions::GLES1) { + Q_D(QOpenGLBuffer); + if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id()) + return false; + while (glGetError() != GL_NO_ERROR) ; // Clear error state. + d->funcs->glGetBufferSubData(d->type, offset, count, data); + return glGetError() == GL_NO_ERROR; + } #else Q_UNUSED(offset); Q_UNUSED(data); Q_UNUSED(count); - return false; #endif + return false; } /*! |