I don't know what is wrong but could I STRONGLY suggest you use the code from http://www.opengl.org/resources/features/OGLextensions/

To detect if an extension is supported. (your code may fail under certain circumstances)

Ffelagund

01-18-2004, 11:09 PM

Check if you have a valid opengl context activated in the same thread that open these extensions.

rgpc

01-19-2004, 02:09 AM

The previous two posts are both valid points. I would recommend the Nehe code. A suggestion would be that you store the pointer returned by glGetString and then do your strstr on that pointer. There are two benefits to this 1. You only call glGetString once (not so important) and 2. you can validate the pointer (if (!ptrString) return; ).

If your pointer is NULL then I would guess that Ffelagunds suggestion is correct and you are trying to call GL functions before you have created your context. Which would make this a beginner question...