summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index e6b5898ca..131a991f3 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -1285,10 +1285,15 @@ static PFNWGLCREATECONTEXTATTRIBSARBPROC _wglCreateContextAttribsARB = nullptr;
static PFNWGLSWAPINTERVALEXTPROC _wglSwapIntervalEXT = nullptr;
static bool _hasWGLARBCreateContextProfile = false; ///< Is WGL_ARB_create_context_profile supported?
-/** Platform-specific callback to get an OpenGL funtion pointer. */
+/** Platform-specific callback to get an OpenGL function pointer. */
static OGLProc GetOGLProcAddressCallback(const char *proc)
{
- return reinterpret_cast<OGLProc>(wglGetProcAddress(proc));
+ OGLProc ret = reinterpret_cast<OGLProc>(wglGetProcAddress(proc));
+ if (ret == nullptr) {
+ /* Non-extension GL function? Try normal loading. */
+ ret = reinterpret_cast<OGLProc>(GetProcAddress(GetModuleHandle(L"opengl32"), proc));
+ }
+ return ret;
}
/**