include/Spectre/System/Log.h: implement a static "Log" class instead of just a function.
This commit is contained in:
parent
e10daeaaa6
commit
3b27db9435
8 changed files with 101 additions and 31 deletions
|
|
@ -18,11 +18,11 @@ static void ensureExtensionsLoaded(HDC dc)
|
|||
init = true;
|
||||
|
||||
if (!gladLoadWGL(dc)) {
|
||||
log("Win32: Could not load WGL extensions\n");
|
||||
Log::error("Win32: Could not load WGL extensions");
|
||||
}
|
||||
|
||||
if (!gladLoadGL()) {
|
||||
log("Win32: Could not load OpenGL extensions\n");
|
||||
Log::error("Win32: Could not load OpenGL extensions\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ bool Win32GLContext::create(const PlatformDisplay* display)
|
|||
|
||||
// Should have a valid handle here. trigger error.
|
||||
if (!m_wnd) {
|
||||
log("Win32 - Could not create GL context: Invalid display handle\n");
|
||||
Log::warn("Win32 - Could not create GL context: Invalid display handle\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ bool Win32GLContext::create(const PlatformDisplay* display)
|
|||
// Make sure we release all handles.
|
||||
destroy();
|
||||
|
||||
log("Win32 - Could not create GL context: %s", Win32GetMessage(GetLastError()));
|
||||
Log::warn("Win32 - Could not create GL context: %s", Win32GetMessage(GetLastError()));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue