[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT FFI only bindings for glfw, OpenCL, OpenGL
- From: Mike Pall <mikelu-1101@...>
- Date: Wed, 26 Jan 2011 14:05:48 +0100
David Given wrote:
> GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint
> maxShaders, GLint *numShaders);
>
> The GL_APICALL and GP_APIENTRY macros can be defined by the platform to
> provide platform-specific tweaks to the ABI. Normally GL_APICALL is
> defined to 'extern' or '__declspec(dllimport)' and GL_APIENTRY to a
> compiler-specific calling convention specifier like '__stdcall' or
> '__ccall'. Which of course means that the ABI can vary drastically
> depending on how your OpenGL library has been built, even on a single
> platform, which means that maintaining an FFI-compatible repository of
> function prototypes isn't adequate.
Neither should be a problem for the LuaJIT FFI. The import stubs
are not needed and __stdcall is automatically detected. So just
omit any calling convention in the declaration and the FFI will
figure it out for you.
--Mike
- References:
- LuaJIT FFI only bindings for glfw, OpenCL, OpenGL, malkia
- Re: LuaJIT FFI only bindings for glfw, OpenCL, OpenGL, CrazyButcher
- Re: LuaJIT FFI only bindings for glfw, OpenCL, OpenGL, Henk Boom
- Re: LuaJIT FFI only bindings for glfw, OpenCL, OpenGL, David Given