diff options
Diffstat (limited to 'src/opengl/qgl_wince.cpp')
-rw-r--r-- | src/opengl/qgl_wince.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index 460f10d..00a125a 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -95,8 +95,27 @@ public: #include <qcolor.h> +/* + QGLTemporaryContext implementation +*/ +class QGLTemporaryContextPrivate +{ +public: + QGLWidget *widget; +}; +QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *) + : d(new QGLTemporaryContextPrivate) +{ + d->widget = new QGLWidget; + d->widget->makeCurrent(); +} + +QGLTemporaryContext::~QGLTemporaryContext() +{ + delete d->widget; +} /***************************************************************************** QGLFormat Win32/WGL-specific code @@ -627,21 +646,4 @@ void QGLWidget::setColormap(const QGLColormap & c) } } -void QGLExtensions::init() -{ - static bool init_done = false; - - if (init_done) - return; - init_done = true; - - // We need a context current to initialize the extensions. - QGLWidget tmpWidget; - tmpWidget.makeCurrent(); - - init_extensions(); - - tmpWidget.doneCurrent(); -} - QT_END_NAMESPACE |