Igo*_*sky 10
GLFWCALL它不是一个类型,它是一个扩展为特定于平台的调用约定的宏,或一个空字符串.这是glfw.h的修剪片段:
#if defined(_WIN32) && defined(GLFW_BUILD_DLL)
#define GLFWCALL __stdcall
#elif defined(_WIN32) && defined(GLFW_DLL)
#define GLFWCALL __stdcall
#else
/* We are either building/calling a static lib or we are non-win32 */
#define GLFWCALL
#endif
Run Code Online (Sandbox Code Playgroud)
在x86/win32上使用正确的调用约定非常重要,因为有些调用约会希望调用者可以通过被调用者清理堆栈.传递参数的顺序也可能存在差异.