View Full Version : OpenGL extensions in Win32

01-14-2005, 06:36 PM
Im have being wondering a long time.

Why does one needs to check if the string of an OpenGL extension is present using glGetString(GL_EXTENSIONS, when you will anyway need to get the address to the functions of the extension using wglGetProcAddress() which will return NULL when the extension is not present?

01-14-2005, 09:04 PM
Some extensions do not add functions - they only add additional parameters which can be passed to existing functions. If you use these extension but they aren't supported by a user's driver/video card then there will be unexpected behaviour in your program and the wglGetProcAddress won't help because it only lets you know if a function is supported or not.

01-15-2005, 12:10 AM
wglGetProcAddress doesn't test if a function is available. You should not rely upon it returning NULL if an extension is not available, it could just return any invalid pointer.