Broke Windows, here's a fix.
parent
5c3b56807a
commit
fe1adfceec
|
@ -26,7 +26,20 @@ static void* AppleGLGetProcAddress (const const char *name)
|
||||||
#pragma warning(disable: 4996)
|
#pragma warning(disable: 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IntGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
static PROC WinGetProcAddress(const char *name)
|
||||||
|
{
|
||||||
|
static HMODULE glMod = NULL;
|
||||||
|
PROC pFunc = wglGetProcAddress((LPCSTR)name);
|
||||||
|
|
||||||
|
if (pFunc) return pFunc;
|
||||||
|
|
||||||
|
if (NULL == glMod)
|
||||||
|
glMod = GetModuleHandleA("OpenGL32.dll");
|
||||||
|
|
||||||
|
return (PROC)GetProcAddress(glMod, (LPCSTR)name);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define IntGetProcAddress(name) WinGetProcAddress(name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Linux, FreeBSD, other */
|
/* Linux, FreeBSD, other */
|
||||||
|
|
|
@ -26,7 +26,20 @@ static void* AppleGLGetProcAddress (const const char *name)
|
||||||
#pragma warning(disable: 4996)
|
#pragma warning(disable: 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IntGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
static PROC WinGetProcAddress(const char *name)
|
||||||
|
{
|
||||||
|
static HMODULE glMod = NULL;
|
||||||
|
PROC pFunc = wglGetProcAddress((LPCSTR)name);
|
||||||
|
|
||||||
|
if (pFunc) return pFunc;
|
||||||
|
|
||||||
|
if (NULL == glMod)
|
||||||
|
glMod = GetModuleHandleA("OpenGL32.dll");
|
||||||
|
|
||||||
|
return (PROC)GetProcAddress(glMod, (LPCSTR)name);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define IntGetProcAddress(name) WinGetProcAddress(name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Linux, FreeBSD, other */
|
/* Linux, FreeBSD, other */
|
||||||
|
|
|
@ -26,7 +26,20 @@ static void* AppleGLGetProcAddress (const const char *name)
|
||||||
#pragma warning(disable: 4996)
|
#pragma warning(disable: 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IntGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
static PROC WinGetProcAddress(const char *name)
|
||||||
|
{
|
||||||
|
static HMODULE glMod = NULL;
|
||||||
|
PROC pFunc = wglGetProcAddress((LPCSTR)name);
|
||||||
|
|
||||||
|
if (pFunc) return pFunc;
|
||||||
|
|
||||||
|
if (NULL == glMod)
|
||||||
|
glMod = GetModuleHandleA("OpenGL32.dll");
|
||||||
|
|
||||||
|
return (PROC)GetProcAddress(glMod, (LPCSTR)name);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define IntGetProcAddress(name) WinGetProcAddress(name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Linux, FreeBSD, other */
|
/* Linux, FreeBSD, other */
|
||||||
|
|
Loading…
Reference in New Issue