backend update from Raze
* moving large allocations off the stack * use proper printf formatters for size_t and ptrdiff_t. * adding some missing 'noexcept'.
This commit is contained in:
parent
df9b2cd9bf
commit
83aa9388ca
29 changed files with 117 additions and 109 deletions
|
|
@ -77,10 +77,19 @@ static void CheckOpenGL(void)
|
|||
if (opengl32dll == 0)
|
||||
{
|
||||
opengl32dll = LoadLibrary(L"OpenGL32.DLL");
|
||||
createcontext = (HGLRC(WINAPI*)(HDC)) GetProcAddress(opengl32dll, "wglCreateContext");
|
||||
deletecontext = (BOOL(WINAPI*)(HGLRC)) GetProcAddress(opengl32dll, "wglDeleteContext");
|
||||
makecurrent = (BOOL(WINAPI*)(HDC, HGLRC)) GetProcAddress(opengl32dll, "wglMakeCurrent");
|
||||
getprocaddress = (PROC(WINAPI*)(LPCSTR)) GetProcAddress(opengl32dll, "wglGetProcAddress");
|
||||
if (opengl32dll != 0)
|
||||
{
|
||||
createcontext = (HGLRC(WINAPI*)(HDC)) GetProcAddress(opengl32dll, "wglCreateContext");
|
||||
deletecontext = (BOOL(WINAPI*)(HGLRC)) GetProcAddress(opengl32dll, "wglDeleteContext");
|
||||
makecurrent = (BOOL(WINAPI*)(HDC, HGLRC)) GetProcAddress(opengl32dll, "wglMakeCurrent");
|
||||
getprocaddress = (PROC(WINAPI*)(LPCSTR)) GetProcAddress(opengl32dll, "wglGetProcAddress");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Should this ever happen we have no choice but to hard abort, there is no good way to recover.
|
||||
MessageBoxA(0, "OpenGL32.dll not found", "Fatal error", MB_OK | MB_ICONERROR | MB_TASKMODAL);
|
||||
exit(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue