title: OpenGL Extensions: How to use them under OS X -- OpenGL newbie
body: <p>Can anybody point me in a direction to a great tutorial or how-to for using OpenGL Extensions using OS X. I'm learning OpenGL and somewhat of a newbie. I'm using a textbook to learn graphics but it doesn't give platform specific instructions on how to get the code to work.</p>
  
  <p>I'm running OS X(10.6.7) on a MacBookPro with a NVidia GeForce 9400M. I have XCode installed, so I have the necessary headers and libraries to compile and run graphics code. I'm attempting to use the OpenGL extensions and now I'm stuck. Here's my problem:</p>
  
  <p>An example in my textbook utilizes a function called glGenVertexArrays. I see in glext.h that there is a function called glGenVertexArrays, a APIENTRYP next to it, and a typedef slightly below it:</p>
  
  <pre><code>wdyn-n233-240-235:GL marklagatuz$ cat glext.h | grep glGenVertexArrays
  GLAPI void APIENTRY glGenVertexArrays (GLsizei, GLuint *);
  GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
  
  typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); 
  </code></pre>
  
  <p>My question is how to utilize this function in my .cpp source code? I've perused the net, and haven't found great documentation. Maybe cause I'm new to this. Could somebody point me into some great help and tutorials?</p>