Extensions in OS X

I’m using VBO, which works fine on Windows and Linux, but I don’t know how to access the extension on OS X. I’m doing this:

#ifdef _WIN32
typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
#else
typedef void (*PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
#endif

PFNGLBINDBUFFERARBPROC glBindBufferARB_ptr = NULL;

#ifdef _WIN32
glBindBufferARB_ptr = (PFNGLBINDBUFFERARBPROC)wglGetProcAddress("glBindBufferARB");
#else
glBindBufferARB_ptr = glBindBufferARB;
#endif

This doesn’t work (or even compile) on OS X because OS X doesn’t define glBindBufferARB in the OpenGL headers.

So I’m trying to just point at the existing glBindBufferARB function, but it’s not declared. Does OS X have some analog to the Windows wglGetProcAddress? I was hoping it would work like Linux, which is to declare the ARB functions in the OpenGL headers so you can simply point at them and be done with it, but no such luck.

I know this is a basic question, so if you would prefer to point me to Apple’s documentation on the subject, that would be great! I haven’t been able to find any decent docs from Apple about extensions in OS X. In fact, their OpenGL extensions guide doesn’t even list ARB_vertex_buffer_object! But everyone keeps saying that it’s available in 10.3.4…

Thanks!

Make your own header , until Apple gets around to updating theirs.

Thanks, arekkusu!

(What a horrible state of affairs from Apple, considering all of their hype about embracing OpenGL?)

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.