[swift-users] Swift can’t compile code with OpenGL function pointers

Joe Groff jgroff at apple.com
Thu Mar 30 11:45:50 CDT 2017

> On Mar 30, 2017, at 9:40 AM, Kelvin Ma <kelvinsthirteen at gmail.com> wrote:
> There are hundreds of gl functions… I have to rewrite the signatures for all of them??

Does GLFW expose any underlying loader mechanism or cached function pointer variables underneath the macros it defines? Possibly you could access those directly. Otherwise, code generation might be your best bet. You should be able to get types like GLenum or GLint just by importing them normally, since those are purely compile-time constructs.


More information about the swift-users mailing list