From b3fcac3e0cf9377645981d4ca9880a0849132bed Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 5 Feb 2014 22:15:59 +0100 Subject: [PATCH] QOpenGLTextureHelper: explain why we use GetProcAddress on Windows / DesktopGL In the future, we might want to refactor this code to inconditionally use the common Desktop / ES2 subset (like the rest of Qt does), and then resolve only the functions actually available at runtime. For now, state why we're doing that on Windows. Change-Id: Ic21035bcd88ddc1d9274fd90a146c2824d783b25 Reviewed-by: Gunnar Sletta Reviewed-by: Sean Harmer --- src/gui/opengl/qopengltexturehelper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp index 97ae4df8047..4f8762483f7 100644 --- a/src/gui/opengl/qopengltexturehelper.cpp +++ b/src/gui/opengl/qopengltexturehelper.cpp @@ -139,6 +139,9 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) } #endif + // wglGetProcAddress should not be used to (and indeed will not) load OpenGL <= 1.1 functions. + // Hence, we resolve them "the hard way" + #if defined(Q_OS_WIN) && !defined(QT_OPENGL_ES_2) HMODULE handle = GetModuleHandleA("opengl32.dll");