   wglGetProcAddress("glFogCoordfEXT") return NULL all the time
  Hi,  I had add opengl32.lib, glu32.lib to my project, and type define  typedef void (APIENTRY * PFNGLFOGCOORDFPROC) (GLfloat);  then I try to get the entry of glFogCoordf() by  myglFogCoordf = (PFNGLFOGCOORDFPROC) wglGetProcAddress("glFogCoordfEXT");  but myglFogCoordf get NULL all the time. what could be the problem?Thanks,Daniel   
  Does your video card support that extension?   ;  use an extension library to set up the extensionseg glee, glew   ;  >>Does your video card support that extension?Yes, I can run the source in CD (attached with "Begining OPENGL Programing" book by Dave&Kevin, in chapter 5) without problem.  Then I copy piece of source to mine (actually only two lines as following), can compile and run fine, but can't get myglFogCoordf.typedef void (APIENTRY * PFNGLFOGCOORDFPROC) (GLfloat);myglFogCoordf = (PFNGLFOGCOORDFPROC) wglGetProcAddress("glFogCoordfEXT");What else can be wrong or missing?Daniel   ;  Can you get other functions from that extension such as glFogCoorddEXT or glFogCoordfvEXT?   ;  Make sure the rendering context (i.e. a window, pretty much) is properly setup before asking for function pointers. You can't ask for function pointers anywhere/at any time in your program.   ;Quote:Original post by dan59314>>Does your video card support that extension?Yes, I can run the source in CD (attached with "Begining OPENGL Programing" book by Dave&Kevin, in chapter 5) without problem.that's not a valid way to verify if you have the extension. you really do need to check the extensions string. you can also download this to check if your card is fully 1.4 compliant. a program like this will try to load extensions different ways (not all card manufacturers use the names in the SGI extension registry). for example it will test for the glFogCoordfEXT entry point first, and if it isn't found will try glFogCoordf as well. what video card do you have?   ;  >>Make sure the rendering context (i.e. a window, pretty much) is properly >>setup before asking for function pointers. You can't ask for function >>pointers anywhere/at any time in your program.Yes, that's the problem, I did that before Redner Context was set.Thanks to Bob,Daniel   