Function pointers from OpenGL loading libraries (particularly those which return functions loaded directly from the DLL) will sometimes be annotated with a different calling convention from regular function pointers.

Such function pointers are not inter-convertible.

There are two ways to handle this. You could use a different OpenGL loading library, one which deals in function pointers that use the standard calling conventions (essentially, hiding the actual pointers it loads). For example, in my glLoadGen loader, if you use the func_cpp generator style, all functions will be regular C++ functions.

Otherwise, you will have to change how your function pointer is declared in your interface to match how your loader works. For example, if you're using GLEW, you would have to do something like this: