summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglextensions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qglextensions.cpp')
-rw-r--r--src/opengl/qglextensions.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp
index c091191..03fca39 100644
--- a/src/opengl/qglextensions.cpp
+++ b/src/opengl/qglextensions.cpp
@@ -191,31 +191,35 @@ bool qt_resolve_frag_program_extensions(QGLContext *ctx)
bool qt_resolve_buffer_extensions(QGLContext *ctx)
{
- if (glMapBufferARB && glUnmapBufferARB
-#if !defined(QT_OPENGL_ES_2)
- && glBindBuffer && glDeleteBuffers && glGenBuffers && glBufferData
-#endif
- )
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
+ if (glBindBuffer && glDeleteBuffers && glGenBuffers && glBufferData
+ && glBufferSubData && glGetBufferParameteriv)
return true;
+#endif
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
glBindBuffer = (_glBindBuffer) qt_gl_getProcAddressARB(ctx, "glBindBuffer");
glDeleteBuffers = (_glDeleteBuffers) qt_gl_getProcAddressARB(ctx, "glDeleteBuffers");
glGenBuffers = (_glGenBuffers) qt_gl_getProcAddressARB(ctx, "glGenBuffers");
glBufferData = (_glBufferData) qt_gl_getProcAddressARB(ctx, "glBufferData");
+ glBufferSubData = (_glBufferSubData) qt_gl_getProcAddressARB(ctx, "glBufferSubData");
+ glGetBufferSubData = (_glGetBufferSubData) qt_gl_getProcAddressARB(ctx, "glGetBufferSubData");
+ glGetBufferParameteriv = (_glGetBufferParameteriv) qt_gl_getProcAddressARB(ctx, "glGetBufferParameteriv");
#endif
glMapBufferARB = (_glMapBufferARB) qt_gl_getProcAddressARB(ctx, "glMapBuffer");
glUnmapBufferARB = (_glUnmapBufferARB) qt_gl_getProcAddressARB(ctx, "glUnmapBuffer");
- return glMapBufferARB
- && glUnmapBufferARB
-#if !defined(QT_OPENGL_ES_2)
- && glBindBuffer
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
+ return glBindBuffer
&& glDeleteBuffers
&& glGenBuffers
&& glBufferData
+ && glBufferSubData
+ && glGetBufferParameteriv;
+ // glGetBufferSubData() is optional
+#else
+ return true;
#endif
- ;
}
bool qt_resolve_glsl_extensions(QGLContext *ctx)