summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-09-03 16:38:25 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-09-03 18:13:51 +0200
commit0bb2b6213518fdc56181b0ab1d6a6635c324dfc2 (patch)
tree3f5846c2a1d1c1efb52533fd63a9c84d463823a0
parent38ea5428c4d84fc71aa80f4b312500cad8ccc8a5 (diff)
windows: Fix dynamic opengl build
Cannot call WGL or EGL functions directly anymore. Change-Id: I0d5c6217679d87a2092c945a9b841dfd7b6c299a Reviewed-by: Andrew Knight <andrew.knight@digia.com>
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
index 886757d4ff..e27b55da3e 100644
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -541,12 +541,12 @@ QWindowsEGLContext::QWindowsEGLContext(QWindowsEGLStaticContext *staticContext,
if (pbuffer == EGL_NO_SURFACE)
return;
- EGLDisplay prevDisplay = eglGetCurrentDisplay();
+ EGLDisplay prevDisplay = QWindowsEGLStaticContext::libEGL.eglGetCurrentDisplay();
if (prevDisplay == EGL_NO_DISPLAY) // when no context is current
prevDisplay = m_eglDisplay;
- EGLContext prevContext = eglGetCurrentContext();
- EGLSurface prevSurfaceDraw = eglGetCurrentSurface(EGL_DRAW);
- EGLSurface prevSurfaceRead = eglGetCurrentSurface(EGL_READ);
+ EGLContext prevContext = QWindowsEGLStaticContext::libEGL.eglGetCurrentContext();
+ EGLSurface prevSurfaceDraw = QWindowsEGLStaticContext::libEGL.eglGetCurrentSurface(EGL_DRAW);
+ EGLSurface prevSurfaceRead = QWindowsEGLStaticContext::libEGL.eglGetCurrentSurface(EGL_READ);
if (QWindowsEGLStaticContext::libEGL.eglMakeCurrent(m_eglDisplay, pbuffer, pbuffer, m_eglContext)) {
const GLubyte *s = QWindowsEGLStaticContext::libGLESv2.glGetString(GL_VERSION);
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 1ed27f545d..869df26ef6 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -1207,8 +1207,8 @@ QWindowsGLContext::~QWindowsGLContext()
bool QWindowsGLContext::updateObtainedParams(HDC hdc, int *obtainedSwapInterval)
{
- HGLRC prevContext = wglGetCurrentContext();
- HDC prevSurface = wglGetCurrentDC();
+ HGLRC prevContext = QOpenGLStaticContext::opengl32.wglGetCurrentContext();
+ HDC prevSurface = QOpenGLStaticContext::opengl32.wglGetCurrentDC();
if (!QOpenGLStaticContext::opengl32.wglMakeCurrent(hdc, m_renderingContext)) {
qWarning("Failed to make context current.");