1
0
Fork 0

source/Platform/Win32/Win32GLContext.cpp: make ensureExtensionsLoaded() return bool.

This commit is contained in:
Henrik Hautakoski 2020-09-20 16:45:58 +02:00
parent 6805e392a7
commit e3c01d4897

View file

@ -17,21 +17,25 @@ static GLADapiproc func_loader(const char *name) {
}
// Ensure that OpenGL extensions are loaded.
static void ensureExtensionsLoaded(HDC dc)
static bool ensureExtensionsLoaded(HDC dc)
{
static bool init = false;
if (!init) {
init = true;
if (!gladLoadWGL(dc, func_loader)) {
Log::error("WGL: Could not load WGL extensions");
return false;
}
if (!gladLoaderLoadGL()) {
Log::error("WGL: Could not load OpenGL extensions");
return false;
}
init = true;
}
return true;
}
Win32GLContext::Win32GLContext() :