summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qglbuffer.cpp')
-rw-r--r--src/opengl/qglbuffer.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index 0bcb9d4f1f..1c9545990f 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -344,20 +344,18 @@ void QGLBuffer::destroy()
bool QGLBuffer::read(int offset, void *data, int count)
{
#if !defined(QT_OPENGL_ES)
- if (QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) {
- Q_D(QGLBuffer);
- 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;
- }
+ Q_D(QGLBuffer);
+ 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);
-#endif
return false;
+#endif
}
/*!