I called an ogl ext function(that func can be supported in opengl1.2) in a win32 console application program(vc2003.net),but I was notified that pointer(glTexImage3D) to the function returns null, why?
I call the funcproc in this way… #include “windows.h” #include “gl.h” #include “glu.h”
wglGetProcAddress wants a string as argument.
You are passing the pointer you want to get filled, which initially, at best, is NULL.
So this should do it:
Did you set up your OpenGL context before trying to get the extension function pointer?
There must be a valid active OpenGL context. Otherwise wglGetProcAddress fails.
A very common mistake…