 mkspecs/features/win32/opengl.prf                  |    8 ++
 src/gui/kernel/qopenglcontext.cpp                  |    5 +-
 src/gui/opengl/qopengl.cpp                         |    2 +
 src/gui/opengl/qopenglfunctions.h                  |    2 +-
 src/gui/opengl/qopenglshaderprogram.cpp            |    3 +-
 .../gl2paintengineex/qpaintengineex_opengl2.cpp    |    1 +
 src/opengl/qglshaderprogram.cpp                    |    7 +-
 .../eglconvenience/qeglplatformcontext.cpp         |   44 ++++++++--
 .../eglconvenience/qeglplatformcontext_p.h         |    2 +
 .../platforms/windows/qwindowseglcontext.cpp       |   93 ++++++++++++++++++++
 src/plugins/platforms/windows/qwindowseglcontext.h |    1 +
 src/plugins/platforms/windows/qwindowsglcontext.h  |   40 ++++++---
 .../platforms/windows/qwindowsintegration.cpp      |   21 ++++-
 src/plugins/platforms/windows/qwindowswindow.cpp   |    3 +
 src/plugins/platforms/windows/qwindowswindow.h     |   13 +++
 src/plugins/platforms/windows/windows.pro          |    7 +-
 16 files changed, 221 insertions(+), 31 deletions(-)

diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
index 3414781..7ad1d35 100644
--- a/mkspecs/features/win32/opengl.prf
+++ b/mkspecs/features/win32/opengl.prf
@@ -6,6 +6,14 @@
 wince* {
     include(../unix/opengl.prf)
 } else {
+contains(QT_CONFIG, opengles2) {
+    INCLUDEPATH += $$quote("C:\\angle\\include")
+    DEFINES += QT_OPENGL_ES_2 QT_OPENGL_ANGLE
+	QMAKE_LIBS *= -L\"C:\\angle\\lib\\Release\" -llibEGL -llibGLESv2 -lEGL -lGLESv2 -lgdi32 -luser32
+	QT_CONFIG -= opengl
+} else {
     QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
     QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
 }
+
+}
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 4668f9e..6b77b96 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -265,12 +265,15 @@ void QOpenGLContext::setScreen(QScreen *screen)
 */
 bool QOpenGLContext::create()
 {
+    qWarning("QOpenGLContext::create()");
     destroy();
 
     Q_D(QOpenGLContext);
     d->platformGLContext = QGuiApplicationPrivate::platformIntegration()->createPlatformOpenGLContext(this);
-    if (!d->platformGLContext)
+    if (!d->platformGLContext){
+        qWarning("createPlatformOpenGLContext");
         return false;
+    }
     d->platformGLContext->setContext(this);
     if (!d->platformGLContext->isSharing())
         d->shareContext = 0;
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 290fcb2..736c014 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -46,6 +46,8 @@
 
 QT_BEGIN_NAMESPACE
 
+
+
 QOpenGLExtensionMatcher::QOpenGLExtensionMatcher(const char *str)
 {
     init(str);
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 8702984..2e15bcc 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -43,7 +43,6 @@
 #define QOPENGLFUNCTIONS_H
 
 #ifndef QT_NO_OPENGL
-
 #ifdef __GLEW_H__
 #if defined(Q_CC_GNU)
 #warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
@@ -56,6 +55,7 @@
 
 //#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
 
+
 #ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
 #include <stdio.h>
 #define Q_OPENGL_FUNCTIONS_DEBUG \
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index c0899e5..2232a28 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -912,8 +912,9 @@ bool QOpenGLShaderProgram::bind()
 {
     Q_D(QOpenGLShaderProgram);
     GLuint program = d->programGuard ? d->programGuard->id() : 0;
-    if (!program)
+    if (!program){
         return false;
+    }
     if (!d->linked && !link())
         return false;
 #ifndef QT_NO_DEBUG
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index ca32adc..fafb675 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -419,6 +419,7 @@ void QGL2PaintEngineExPrivate::updateMatrix()
     glVertexAttrib3fv(QT_PMV_MATRIX_2_ATTR, pmvMatrix[1]);
     glVertexAttrib3fv(QT_PMV_MATRIX_3_ATTR, pmvMatrix[2]);
 
+
     dasher.setInvScale(inverseScale);
     stroker.setInvScale(inverseScale);
 }
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index ab5fa6a..cf799b8 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -226,8 +226,9 @@ QGLShaderPrivate::~QGLShaderPrivate()
 bool QGLShaderPrivate::create()
 {
     QGLContext *context = const_cast<QGLContext *>(QGLContext::currentContext());
-    if (!context)
+    if (!context){
         return false;
+    }
     if (qt_resolve_glsl_extensions(context)) {
         GLuint shader;
         if (shaderType == QGLShader::Vertex)
@@ -237,7 +238,7 @@ bool QGLShaderPrivate::create()
         else
             shader = glCreateShader(GL_FRAGMENT_SHADER);
         if (!shader) {
-            qWarning() << "QGLShader: could not create shader";
+            qWarning() << "QGLShader: could not create shader" << shaderType;
             return false;
         }
         shaderGuard = createSharedResourceGuard(context, shader, freeShaderFunc);
@@ -911,6 +912,8 @@ bool QGLShaderProgram::link()
             qWarning() << "QGLShader::link:" << d->log;
         else
             qWarning() << "QGLShader::link[" << name << "]:" << d->log;
+        foreach (QGLShader *shader, d->shaders)
+            qDebug()  << shader->sourceCode();
         delete [] logbuf;
     }
     return d->linked;
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 71e1820..0dcb6c3 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -40,12 +40,10 @@
 ****************************************************************************/
 
 #include "qeglplatformcontext_p.h"
-
 #include "qeglconvenience_p.h"
-
 #include <QtGui/QPlatformWindow>
-
 #include <EGL/egl.h>
+#include <QDebug>
 
 QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
                                          EGLenum eglApi)
@@ -53,8 +51,30 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
     , m_eglApi(eglApi)
     , m_format(format)
 {
-    EGLConfig config = q_configFromGLFormat(display, format, true);
-    m_format = q_glFormatFromConfig(display, config);
+    EGLConfig config;
+
+    qWarning("Init");
+    EGLint major, minor, numConfigs;
+    if (!eglInitialize(display, &major, &minor)) {
+        qWarning("Could not initialize egl display %d\n", eglGetError());
+    }
+    qWarning() << format.majorVersion() << "??";
+
+    EGLint const attrib_list[] = {
+            EGL_RED_SIZE, 4,
+            EGL_GREEN_SIZE, 4,
+            EGL_BLUE_SIZE, 4,
+            EGL_NONE
+        };
+   if ( !eglGetConfigs(display, NULL, 0, &numConfigs) )
+       qWarning("!eglGetConfigs %d\n", eglGetError());
+
+   // Choose config
+   if ( !eglChooseConfig(display, attrib_list, &config, 1, &numConfigs) )
+       qWarning("!eglChooseConfig %d\n", eglGetError());
+
+
+    m_format = q_glFormatFromConfig(m_eglDisplay, config);
 
     m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : 0;
 
@@ -65,10 +85,14 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
 
     eglBindAPI(m_eglApi);
     m_eglContext = eglCreateContext(m_eglDisplay, config, m_shareContext, contextAttrs.constData());
-    if (m_eglContext == EGL_NO_CONTEXT && m_shareContext != EGL_NO_CONTEXT) {
-        m_shareContext = 0;
-        m_eglContext = eglCreateContext(m_eglDisplay, config, 0, contextAttrs.constData());
+    if (m_eglContext == EGL_NO_CONTEXT) {
+        qWarning("eglCreateContext FAILED %d", eglGetError());
+        if(m_shareContext != EGL_NO_CONTEXT){
+            m_shareContext = 0;
+            m_eglContext = eglCreateContext(m_eglDisplay, config, 0, contextAttrs.constData());
+        }
     }
+    m_eglConfig = config;
 }
 
 bool QEGLPlatformContext::makeCurrent(QPlatformSurface *surface)
@@ -157,3 +181,7 @@ EGLContext QEGLPlatformContext::eglContext() const
 {
     return m_eglContext;
 }
+
+EGLContext QEGLPlatformContext::eglDisplay() const{
+    return m_eglDisplay;
+}
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index 75375fa..5e4b11f 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -63,8 +63,10 @@ public:
     bool isValid() const { return m_eglContext != EGL_NO_CONTEXT; }
 
     EGLContext eglContext() const;
+    EGLDisplay eglDisplay() const;
 
 protected:
+    EGLConfig m_eglConfig;
     virtual EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) = 0;
 
 private:
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
new file mode 100644
index 0000000..4a17ebe
--- /dev/null
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwindowseglcontext.h"
+#include "qwindowscontext.h"
+#include "qwindowswindow.h"
+
+#include <QtCore/QDebug>
+#include <QtCore/QSysInfo>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QPlatformNativeInterface>
+#include <QtGui/qopengl.h>
+
+
+
+
+
+
+QWindowsGLContext::QWindowsGLContext(const QSurfaceFormat & format, QPlatformOpenGLContext* context, HDC dc)
+    :QEGLPlatformContext(format, context, eglGetDisplay((EGLNativeDisplayType)dc), EGL_OPENGL_ES_API)
+{
+}
+
+
+EGLSurface QWindowsGLContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface){
+
+    QWindowsWindow *window = static_cast<QWindowsWindow *>(surface);
+    return window->getEGLSurfaceHandle();
+}
+
+
+
+
+bool QWindowsGLContext::makeCurrent(QPlatformSurface *surface){
+    QWindowsWindow *window = static_cast<QWindowsWindow *>(surface);
+    EGLSurface eglSurface = window->getEGLSurfaceHandle();
+    EGLDisplay display = eglDisplay();
+    if(!eglSurface){
+        const HWND hwnd = window->handle();
+        eglSurface = eglCreateWindowSurface(display,m_eglConfig, (EGLNativeWindowType)hwnd, NULL);
+        if (eglSurface == EGL_NO_SURFACE) {
+            qWarning("Could not create the egl surface: error = 0x%x\n", eglGetError());
+            return false;
+        }
+        window->setEGLSurfaceHandle(eglSurface);
+        qWarning("Initialized display");
+    }
+    bool ok = eglMakeCurrent(display, eglSurface, eglSurface, eglContext());
+    if(!ok)
+        qWarning("QEGLPlatformContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this);
+    return ok;
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.h b/src/plugins/platforms/windows/qwindowseglcontext.h
new file mode 100644
index 0000000..f80f0e8
--- /dev/null
+++ b/src/plugins/platforms/windows/qwindowseglcontext.h
@@ -0,0 +1 @@
+#include "qwindowsglcontext.h"
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index a0489e2..a2723dd 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -49,10 +49,16 @@
 #include <QtGui/QOpenGLContext>
 #include <QtCore/QSharedPointer>
 
+#ifdef QT_OPENGL_ANGLE
+    #include <QtPlatformSupport/private/qeglconvenience_p.h>
+    #include <QtPlatformSupport/private/qeglplatformcontext_p.h>
+#endif
+
 QT_BEGIN_NAMESPACE
 
 class QDebug;
 
+#ifndef QT_OPENGL_ANGLE
 enum QWindowsGLFormatFlags
 {
     QWindowsGLDirectRendering = 0x1,
@@ -105,6 +111,15 @@ public:
         SampleBuffers = 0x1
     };
 
+    static QOpenGLStaticContext *create();
+    static QByteArray getGlString(unsigned int which);
+
+    const QByteArray vendor;
+    const QByteArray renderer;
+    const QByteArray extensionNames;
+    unsigned extensions;
+    const QWindowsOpenGLContextFormat defaultFormat;
+
     typedef bool
         (APIENTRY *WglGetPixelFormatAttribIVARB)
             (HDC hdc, int iPixelFormat, int iLayerPlane,
@@ -126,15 +141,6 @@ public:
     bool hasExtensions() const
         { return wglGetPixelFormatAttribIVARB && wglChoosePixelFormatARB && wglCreateContextAttribsARB; }
 
-    static QOpenGLStaticContext *create();
-    static QByteArray getGlString(unsigned int which);
-
-    const QByteArray vendor;
-    const QByteArray renderer;
-    const QByteArray extensionNames;
-    unsigned extensions;
-    const QWindowsOpenGLContextFormat defaultFormat;
-
     WglGetPixelFormatAttribIVARB wglGetPixelFormatAttribIVARB;
     WglChoosePixelFormatARB wglChoosePixelFormatARB;
     WglCreateContextAttribsARB wglCreateContextAttribsARB;
@@ -149,9 +155,6 @@ class QWindowsGLContext : public QPlatformOpenGLContext
 public:
     typedef QSharedPointer<QOpenGLStaticContext> QOpenGLStaticContextPtr;
 
-    explicit QWindowsGLContext(const QOpenGLStaticContextPtr &staticContext,
-                               QOpenGLContext *context);
-    virtual ~QWindowsGLContext();
     bool isSharing() const                { return m_context->shareHandle(); }
     bool isValid() const                  { return m_renderingContext; }
     virtual QSurfaceFormat format() const { return m_obtainedFormat; }
@@ -169,7 +172,6 @@ public:
 
 private:
     inline void releaseDCs();
-
     const QOpenGLStaticContextPtr m_staticContext;
     QOpenGLContext *m_context;
     QSurfaceFormat m_obtainedFormat;
@@ -179,6 +181,18 @@ private:
     int m_pixelFormat;
     bool m_extensionsUsed;
 };
+#else
+class QWindowsGLContext : public QEGLPlatformContext
+{
+public:
+    explicit QWindowsGLContext(const QSurfaceFormat & format, QPlatformOpenGLContext* context, HDC dc);
+
+    bool makeCurrent(QPlatformSurface *surface);
+
+protected:
+    EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface);
+};
+#endif
 
 QT_END_NAMESPACE
 
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 45f6ecf..554dbd6 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -69,6 +69,7 @@
 #include <QtCore/private/qeventdispatcher_win_p.h>
 #include <QtCore/QDebug>
 
+
 QT_BEGIN_NAMESPACE
 
 /*!
@@ -141,8 +142,10 @@ void *QWindowsNativeInterface::nativeResourceForContext(const QByteArray &resour
         return 0;
     }
     QWindowsGLContext *windowsContext = static_cast<QWindowsGLContext *>(context->handle());
-    if (resource == "renderingContext")
-        return windowsContext->renderingContext();
+    if (resource == "renderingContext"){
+        return 0;
+        //return windowsContext->renderingContext();
+    }
 
     qWarning("%s: Invalid key '%s' requested.", __FUNCTION__, resource.constData());
     return 0;
@@ -171,7 +174,9 @@ void *QWindowsNativeInterface::createMessageWindow(const QString &classNameTempl
 
 struct QWindowsIntegrationPrivate
 {
+#ifndef QT_OPENGL_ANGLE
     typedef QSharedPointer<QOpenGLStaticContext> QOpenGLStaticContextPtr;
+#endif
 
     QWindowsIntegrationPrivate();
     ~QWindowsIntegrationPrivate();
@@ -182,7 +187,9 @@ struct QWindowsIntegrationPrivate
     QWindowsClipboard m_clipboard;
     QWindowsDrag m_drag;
     QWindowsGuiEventDispatcher *m_eventDispatcher;
+#ifndef QT_OPENGL_ANGLE
     QOpenGLStaticContextPtr m_staticOpenGLContext;
+#endif
     QWindowsInputContext m_inputContext;
 #ifndef QT_NO_ACCESSIBILITY
     QWindowsAccessibility m_accessibility;
@@ -270,8 +277,17 @@ QPlatformBackingStore *QWindowsIntegration::createPlatformBackingStore(QWindow *
 QPlatformOpenGLContext
     *QWindowsIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
 {
+    qWarning() << "createPlatformOpenGLContext";
     if (QWindowsContext::verboseIntegration)
         qDebug() << __FUNCTION__ << context->format();
+#ifdef QT_OPENGL_ANGLE
+    HDC dc = QWindowsContext::instance()->displayContext();
+    if (!dc){
+        qWarning() << "No Display";
+        return 0;
+    }
+    return new QWindowsGLContext(context->format(), context->handle(), dc);
+#else
     if (d->m_staticOpenGLContext.isNull())
         d->m_staticOpenGLContext =
             QSharedPointer<QOpenGLStaticContext>(QOpenGLStaticContext::create());
@@ -279,6 +295,7 @@ QPlatformOpenGLContext
     if (result->isValid())
         return result.take();
     return 0;
+#endif
 }
 
 /* Workaround for QTBUG-24205: In 'Auto', pick the FreeType engine for
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 8798048..311d551 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -621,6 +621,9 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
     m_cursor(QWindowsScreen::screenOf(aWindow)->windowsCursor()->standardWindowCursor()),
     m_dropTarget(0),
     m_savedStyle(0)
+#ifdef QT_OPENGL_ANGLE
+   ,m_eglSurface(0)
+#endif
 {
     if (aWindow->surfaceType() == QWindow::OpenGLSurface)
         setFlag(OpenGLSurface);
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index badc229..3ca1580 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -46,6 +46,9 @@
 #include "qwindowscursor.h"
 
 #include <QtGui/QPlatformWindow>
+#ifdef QT_OPENGL_ANGLE
+    #include <EGL/egl.h>
+#endif
 
 QT_BEGIN_NAMESPACE
 
@@ -175,6 +178,11 @@ public:
     HDC getDC();
     void releaseDC();
 
+#ifdef QT_OPENGL_ANGLE
+    EGLSurface getEGLSurfaceHandle() const { return m_eglSurface;}
+    void setEGLSurfaceHandle(EGLSurface eglSurface) { m_eglSurface = eglSurface;}
+#endif
+
     void getSizeHints(MINMAXINFO *mmi) const;
 
     QWindowsWindowCursor cursor() const { return m_cursor; }
@@ -225,6 +233,11 @@ private:
     QWindowsOleDropTarget *m_dropTarget;
     unsigned m_savedStyle;
     QRect m_savedFrameGeometry;
+
+#ifdef QT_OPENGL_ANGLE
+    EGLSurface m_eglSurface;
+#endif
+
 };
 
 // Conveniences for window frames.
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
index 63275d3..a5530e8 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
@@ -9,7 +9,7 @@ INCLUDEPATH += ../../../3rdparty/harfbuzz/src
 QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
 
 # Note: OpenGL32 must precede Gdi32 as it overwrites some functions.
-LIBS *= -lOpenGL32 -lGdi32 -lUser32 -lOle32 -lWinspool -lImm32 -lWinmm  -lOleaut32
+LIBS *= -lGdi32 -lUser32 -lOle32 -lWinspool -lImm32 -lWinmm  -lOleaut32
 win32-g++: LIBS *= -luuid
 # For the dialog helpers:
 LIBS *= -lshlwapi -lShell32
@@ -38,7 +38,7 @@ SOURCES += \
     qwindowsfontdatabase.cpp \
     qwindowsmousehandler.cpp \
     qwindowsguieventdispatcher.cpp \
-    qwindowsglcontext.cpp \
+    qwindowseglcontext.cpp \
     qwindowsclipboard.cpp \
     qwindowsole.cpp \
     qwindowsmime.cpp \
@@ -74,7 +74,8 @@ HEADERS += \
     qwindowsinputcontext.h \
     qwindowstheme.h \
     qwindowsdialoghelpers.h \
-    qwindowsservices.h
+    qwindowsservices.h \
+    qwindowseglcontext.h
 
 # Enable access to HB_Face in harfbuzz includes included by qfontengine_p.h.
 DEFINES *= QT_COMPILES_IN_HARFBUZZ
