PDA

View Full Version : Extension naming confusion



Ulfenstein
07-08-2004, 08:57 AM
Under Windows, gwlGetProcAddress("glBlendEquation") and gwlGetProcAddress("glBlendEquationEXT") both work (provided that the drivers support GL_ARB_IMAGING, of course). Why the two different versions?

My guess is that "glBlendEquationEXT" is provided for backwards compatibility, but when is functionality from an extension promoted from "EXT" to non-"EXT"?

A possiblity I can think of is that the EXT postfix is used until the function becomes core functionality in some (higher) OGL version. But would that mean that extensions introduced just to enable OS's which do not support the core features of that higher version to access its functionality would not have any "EXT" functions? Perhaps there are no such extensions.

Under Windows, you have to use the extension mechanism to access core functionality from versions above 1.1 (before you start flaming me, read http://www.gamedev.net/reference/articles/article1929.asp ) . If some extension would be introduced just to enable Windows applications to access functionality already to be included in the core in a future version, would that extension have "EXT" functions? I mean, there's nothing to be backwards compatible with..

Help appreciated :confused:

Korval
07-08-2004, 09:52 AM
If it doesn't have a suffix (EXT, ARB, etc), then it isn't an extension; it's a core feature of an OpenGL version higher than 1.1. At which point, the function pointer entrypoints are governed by the appropriate OpenGL specification, not by the extension specification.

V-man
07-08-2004, 11:59 AM
If the extension string (ie: glGetString(GL_EXTENSIONS)) return the extension in question, then you can expect that glBlendEquationEXT will be present.

If glGetString(GL_VERSION) is >= to the version where it became core, then glBlendEquation will be present.

It's possible that both will be present and both function pointers are identical (most likely).

It's possible both are present and both functions pointers are not the same.

Some people don't bother with GL version number and just check the extension string which always has worked so far.