diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-11 00:10:50 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-11 00:10:50 (GMT) |
commit | f5417ce0e6c46b56a21b7bc968cc67b22d894392 (patch) | |
tree | a8a1f23b30a644fd2e21f68791042541977333ce | |
parent | c5455e3aa004cc8ecf430b15def1d2000c886f45 (diff) | |
download | Qt-f5417ce0e6c46b56a21b7bc968cc67b22d894392.zip Qt-f5417ce0e6c46b56a21b7bc968cc67b22d894392.tar.gz Qt-f5417ce0e6c46b56a21b7bc968cc67b22d894392.tar.bz2 |
Resolve GL buffer functions in a better way
This change should make qt_resolve_buffer_extensions() handle all
of the ARB, OES, and regular name variants for glBindBuffer(), etc
that may occur in the wild.
Reviewed-by: trustme
-rw-r--r-- | src/opengl/qglextensions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp index 69946a1..3699d62 100644 --- a/src/opengl/qglextensions.cpp +++ b/src/opengl/qglextensions.cpp @@ -199,13 +199,13 @@ bool qt_resolve_buffer_extensions(QGLContext *ctx) return true; #if !defined(QT_OPENGL_ES_2) - glBindBuffer = (_glBindBuffer) ctx->getProcAddress(QLatin1String("glBindBufferARB")); - glDeleteBuffers = (_glDeleteBuffers) ctx->getProcAddress(QLatin1String("glDeleteBuffersARB")); - glGenBuffers = (_glGenBuffers) ctx->getProcAddress(QLatin1String("glGenBuffersARB")); - glBufferData = (_glBufferData) ctx->getProcAddress(QLatin1String("glBufferDataARB")); + 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"); #endif - glMapBufferARB = (_glMapBufferARB) ctx->getProcAddress(QLatin1String("glMapBufferARB")); - glUnmapBufferARB = (_glUnmapBufferARB) ctx->getProcAddress(QLatin1String("glUnmapBufferARB")); + glMapBufferARB = (_glMapBufferARB) qt_gl_getProcAddressARB(ctx, "glMapBuffer"); + glUnmapBufferARB = (_glUnmapBufferARB) qt_gl_getProcAddressARB(ctx, "glUnmapBuffer"); return glMapBufferARB && glUnmapBufferARB |