forked from organicmaps/organicmaps-tmp
Process errors in getting OpenGL function pointers (windows).
This commit is contained in:
parent
7335d21664
commit
202788ffe3
1 changed files with 8 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "opengl_win32.hpp"
|
||||
|
||||
#include "../../base/assert.hpp"
|
||||
#include "../../base/logging.hpp"
|
||||
|
||||
#include "../../base/start_mem_debug.hpp"
|
||||
|
||||
|
@ -34,7 +34,13 @@ namespace win32
|
|||
template <class TRet>
|
||||
TRet GetGLProc(HMODULE hInst, char const * name)
|
||||
{
|
||||
return reinterpret_cast<TRet>(::wglGetProcAddress(name));
|
||||
PROC p = ::wglGetProcAddress(name);
|
||||
if (p == 0)
|
||||
{
|
||||
DWORD const err = ::GetLastError();
|
||||
LOG(LCRITICAL, ("OpenGL extension function ", name, " not found. Last error = ", err);
|
||||
}
|
||||
return reinterpret_cast<TRet>(p);
|
||||
}
|
||||
|
||||
void InitOpenGL()
|
||||
|
|
Loading…
Add table
Reference in a new issue