SDL_GL_GetProcAddress (off-topic)

When I use 1st line in prototypes compiler fail in SDL_GL_GetProcAddress
line because return void*
When I use 2nd line in prototypes compiler fail in last line because void*
is not a function prototype.
So, what cast I must use?
Can you rewrite these 3 lines correctly?----------------------------------------------------------------------------

//prototypes
void (glCompressedTexImage2DARB) (GLenum, GLint, GLenum, GLsizei, GLsizei,
GLint, GLsizei, const void
);
//void *glCompressedTexImage2DARB;

//load function
glCompressedTexImage2DARB =
SDL_GL_GetProcAddress(“glCompressedTexImage2DARB”);

//use function
glCompressedTexImage2DARB(GL_TEXTURE_2D, z, dxt_f, width, height, 0, size,
(byte*) tex + offset);

When I use 1st line in prototypes compiler fail in SDL_GL_GetProcAddress
line because return void*

You need to cast it to the type of function it’s returning.
See src/video/x11/SDL_x11gl.c for examples.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment