source/Platform/Win32/Win32GLContext.cpp: make ensureExtensionsLoaded() return bool.
This commit is contained in:
parent
6805e392a7
commit
e3c01d4897
1 changed files with 6 additions and 2 deletions
|
|
@ -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() :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue