I was reading opengl es book and in the source code i found this Macro
///
// Macros
//
#define ESUTIL_API
#define ESCALLBACK
later in the implementation file .c
void ESUTIL_API esInitContext ( ESContext *esContext )
{
if ( esContext != NULL )
{
memset( esContext, 0, sizeof( ESContext) );
}
}
from what I understand macros, they just replace what is defined by the macro.. although i don’t understand what it is the point in this case.
Thanks.
This kind of macro is used to change the calling convention that is used by the compiler:
or
The call type calling convention has usually to be put in a function definition between the return type and the function identifier name.