As titled, writing a customized gl wrapper, I'm defining each function via
glXGetProcAddressARB, because the header exposes from itself functions as:
typedef void (APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
However, if I define
GL_GLEXT_PROTOTYPES before importing
#include "/usr/include/GL/glcorearb.h" then I have also the normal functions:
#ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCullFace (GLenum mode);
For the sake of curiosity, I'd like now to compare the function address I manually retrieved via
glXGetProcAddressARB with the one of
var a = glCullFace print(&a)
But I keep getting:
error: '&' used with non-inout argument of type 'Any'
print(unsafeBitCast(glCullFace.self, to: UnsafeMutableRawPointer.self))
But I get:
Fatal error: Can't unsafeBitCast between types of different sizes
Which is the right way?