diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-06-04 19:37:07 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-06-05 21:28:28 +0000 |
commit | 9397251b76b89b7ca244ec5225dc17dd3b9afc0b (patch) | |
tree | 0714a8232548ae06bfefeeb02fe1ae8cc94d282a /src/core/gl_context_qt.cpp | |
parent | c9c3c0298ffb23976ef7a247da54a1e06ad8a6ff (diff) |
Fix compilation with opengl es2
Do not include <QOpenGLContext> with gl_bindings.h since
this will eventually include gl and gles heders into same
compilation unit.
Confilicting headers:
third_party/khronos/GLES3/gl32.h
third_party/mesa/src/include/GL/gl.h
Change-Id: I0450a4084011ead4bfa80d68aeea3f5859df4c94
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/gl_context_qt.cpp')
-rw-r--r-- | src/core/gl_context_qt.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp index cd82b1069..9ed1db8ba 100644 --- a/src/core/gl_context_qt.cpp +++ b/src/core/gl_context_qt.cpp @@ -144,6 +144,17 @@ void* GLContextHelper::getNativeDisplay() return resourceForIntegration(QByteArrayLiteral("nativedisplay")); } +QFunctionPointer GLContextHelper::getGlXGetProcAddress() +{ + QFunctionPointer get_proc_address = nullptr; +#ifndef QT_NO_OPENGL + if (QOpenGLContext *context = qt_gl_global_share_context()) { + get_proc_address = context->getProcAddress("glXGetProcAddress"); + } +#endif + return get_proc_address; +} + QT_END_NAMESPACE #if defined(USE_OZONE) || defined(OS_WIN) |