Hello.
I'm trying to use openGL extension functions in a way that will compile on multiple platforms, hence I am using freeglut's glutGetProcAddress function. However, when I have code like the following:
Code:
void (*glConvolutionFilter2D)(GLenum target,
GLenum internalformat, GLsizei width,
GLsizei height, GLenum format,
GLenum type, const GLvoid *image) __attribute__((cdecl));
glConvolutionFilter2D = glutGetProcAddress("glConvolutionFilter2D");
The last line generates the compile error:
invalid conversion from ‘void*’ to ‘void (*)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*)'
I have had a look at function-pointers.org and this is what it suggests.
What am I doing wrong?