From 2c76d3bc875a558495e8d725759c8a0d271ab7a5 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 21 Sep 2020 18:00:08 +0200 Subject: [PATCH] source/Platform/Win32/Win32GLContext.cpp: no need to have our own wgl extension loader (fixed in latest glad2) --- source/Platform/Win32/Win32GLContext.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/source/Platform/Win32/Win32GLContext.cpp b/source/Platform/Win32/Win32GLContext.cpp index a7153b7..475394a 100644 --- a/source/Platform/Win32/Win32GLContext.cpp +++ b/source/Platform/Win32/Win32GLContext.cpp @@ -9,13 +9,6 @@ namespace sp { -// Can't use GLAD's standard loader function because it -// calls wglGetProcAddress without __stdcall -// that results in some runtime exception. -static GLADapiproc func_loader(const char *name) { - return (GLADapiproc) wglGetProcAddress(name); -} - // Ensure that OpenGL extensions are loaded. static bool ensureExtensionsLoaded(HDC dc) { @@ -23,7 +16,7 @@ static bool ensureExtensionsLoaded(HDC dc) if (!init) { - if (!gladLoadWGL(dc, func_loader)) { + if (!gladLoaderLoadWGL(dc)) { Log::error("WGL: Could not load WGL extensions"); return false; }