src/opengl/qgl_wince.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 8 3f74d0d4af4c
--- a/src/opengl/qgl_wince.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/opengl/qgl_wince.cpp	Fri Feb 19 23:40:16 2010 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -95,8 +95,27 @@
 
 #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 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