diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-10 22:30:20 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-10 22:30:20 (GMT) |
commit | 7c52bd0b28eaf0b1d5435fda6140a9d05fddba19 (patch) | |
tree | 0c2e4613748a62d9cc4810a0b1dfdf2a42e43c40 /src/opengl/qgl_x11egl.cpp | |
parent | 80c11987819a2451ebecefc5b2bf1b42ad4499ae (diff) | |
download | Qt-7c52bd0b28eaf0b1d5435fda6140a9d05fddba19.zip Qt-7c52bd0b28eaf0b1d5435fda6140a9d05fddba19.tar.gz Qt-7c52bd0b28eaf0b1d5435fda6140a9d05fddba19.tar.bz2 |
Make an EGL context current when initializing GL extensions
Reviewed-by: trustme
Diffstat (limited to 'src/opengl/qgl_x11egl.cpp')
-rw-r--r-- | src/opengl/qgl_x11egl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 055138d..c54315f 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -470,7 +470,14 @@ void QGLExtensions::init() if (init_done) return; init_done = true; + + // We need a context current to initialize the extensions. + QGLWidget tmpWidget; + tmpWidget.makeCurrent(); + init_extensions(); + + tmpWidget.doneCurrent(); } // Re-creates the EGL surface if the window ID has changed or if force is true |