function prototype
From: <- Chameleon -> (cham_gss_at_hotmail.NOSPAM.com)
Date: 02/27/04
- Next message: red floyd: "Re: function prototype"
- Previous message: Duane: "Re: Change destructor qualifier"
- Next in thread: red floyd: "Re: function prototype"
- Reply: red floyd: "Re: function prototype"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Feb 2004 00:52:03 +0200
When I use 1st line in prototypes, compiler fails because SDL_GL_GetProcAddress return (void*)
When I use 2nd line in prototypes, compiler fails in last line because (void*) is not a function prototype.
So, what cast I must use?
Can you rewrite these 3 lines correctly?
With 1st line in prototypes, I used:
glCompressedTexImage2DARB =
(void (*glCompressedTexImage2DARB)
(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void*))
SDL_GL_GetProcAddress("glCompressedTexImage2DARB");
but it does not work
-------------------------------------------------------------------------
//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);
- Next message: red floyd: "Re: function prototype"
- Previous message: Duane: "Re: Change destructor qualifier"
- Next in thread: red floyd: "Re: function prototype"
- Reply: red floyd: "Re: function prototype"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|