   How do I set up Extensions in linux or on OSX
  Hey, how do I go about using this particular extension in linux (more generally any extension) I'd rather not use GLEW because it's just one extension that we need.  But if I need to I will use it, it's just I'd rather keep fewer external libs where a few extra lines of code could replace it.  And all we need is linux and OSX now.So here is the code for setting up our function pointer on windows, however this doesn't work on my friend's linux box.  Any suggestions?  //first the definition   void (APIENTRY * pglBlendFuncSeparateEXT) (GLenum, GLenum, GLenum, GLenum) = NULL; //then later we do this to set up the function pointer   char* extensionsList = (char*) glGetString(GL_EXTENSIONS);   //OPENGL EXTENSION: blend_func_separate   if(strstr(extensionsList, "GL_EXT_blend_func_separate ")==NULL){ printf("\nCritical Error: the opengl extension GL_EXT_blend_func_separate IS NOT SUPPORTED ON THIS SYSTEM\n"); exit(0);   } pglBlendFuncSeparateEXT  = (void (APIENTRY *) (GLenum, GLenum, GLenum, GLenum)) wglGetProcAddress("glBlendFuncSeparateEXT");Checking google all I see is stuff for windows, maybe my search methods are lacking, but in any case, even a link to a good tutorial would be appreciated.Thanks guys.   
  i'ld check out some already written examples eg nehe, sdl theres also a pdf on the www.opengl.org site that shows how to set up extensions.Quote:I'd rather not use GLEW because it's just one extensionild give glew etc a go, since there will prollly be others u want to use later eg vbo   ;  I don't know much about OpenGL (Barely learning) but my OpenGL Red Book 1.1 says this, it's most likely wrong but it might help:linuxBool glXQueryExtension(Display *dpy, int *errorBase, int *eventBase)const char *glXQueryExtensionString(Display *dpy, int screen)OSXI'm not sure, though I believe it has something to do with agl?EDIT: Oop seems like you meant for something else, sorry, was just trying to help some way or another.   ;  I was hoping for an example snippet... But here's a link I found:http://www.opengl.org//resources/faq/technical/extensions.htmwe'll look through it.  I can't say much as I don't have a linux box, so I'll just check back and will let you know if we get it.   ;  Your glGetString portion of the code remains same. To load the extension jsut use glXGetProcAddressARB((GLubyte*) name) (I also recommend using typedef's for the function pointers, like those in glext.h).Note though that various versions of GLX behave differently with regard to glXGetProcAddressARB. For the Nvidia 77.xx driver (IIRC) I had to #define GLX_GLXEXT_LEGACY, include glxext.h and use glXGetProcAddressARB. Read this.   ;  Thank you, that's exactly what I was looking for.Final question, anything for OSX?   ;  I was doing something similar to you some time back. I had a linux box to test, but I still don't (and didn't) have any info for a Mac so I won't be able to give concrete help.However, read this (and the links from that page as well). It's not very clear but if you have a Mac to test on, you can try the NSLookupAndBindSymbol.   ;  Wait, wait... This particular extension is standard in OpenGL 2.0 I believe (at least that's what Phantom said)  And I just read on here that OSX had full 2.0 support.Should it work automagically if I just call the function?  Do I still need the EXT portion if it's part of the standard though?  Like... I wonder if it's under a different name in gl 2.0   ;Quote:Original post by M2tMWait, wait... This particular extension is standard in OpenGL 2.0 I believe (at least that's what Phantom said)  And I just read on here that OSX had full 2.0 support.Should it work automagically if I just call the function?  Do I still need the EXT portion if it's part of the standard though?  Like... I wonder if it's under a different name in gl 2.0Yes, if it's in the core you should leave out the EXT at the end. And if OSX has full 2.0 support, it should work as-is, but I wonder what happens if the card doesn't support EXT_blend_func_separate ...   ;  MacOS X 10.4 (the current OS) supports OpenGL 1.5 (at least on ATI gfx cards) but not OpenGL 2.0; perhaps 10.5 will do so.AFAIK until today Apple doesn't provide a aglGetProcAddress. Seehttp://developer.apple.com/qa/qa2001/qa1188.htmlfor a discussion and solution. Yes, it is of 2001, no joke.EDIT: I've seen that deavik's link into developer.apple.com in fact provides the same information as does the Q&A I've linked to above. However, deavik's link refers to documentation of 2006, so it really seems that Apple still provides no convenient way of fetching routine pointers :([Edited by - haegarr on July 26, 2006 12:56:31 PM]