Hi
I am trying to use:
wglGetProcAddress
in Windows 8.1
The errors I am getting are:
error C2100: illegal indirection
error C2064: term does not evaluate to a function taking 339 arguments
I have no idea how to use this windows function
GLuint triangleVBO;
void *vPointer;
vPointer = GetAnyGLFuncAddress("glGenBuffers");
(*vPointer)(1, &triangleVBO);
where
void *GetAnyGLFuncAddress(const char *name)
{
void *p = (void *)wglGetProcAddress(name);
if (p == 0 ||
(p == (void*)0x1) || (p == (void*)0x2) || (p == (void*)0x3) ||
(p == (void*)-1))
{
HMODULE module = LoadLibraryA("opengl32.dll");
p = (void *)GetProcAddress(module, name);
}
return p;
}
Any help gratefully appreciated.
MacSam