# wglGetProcAddress

Definition: | include pGUI.e include opengl.e atom addr = wglGetProcAddress(string name)
Description: | The wglGetProcAddress function returns the address of an OpenGL extension function for use with the current OpenGL rendering context. name: an extension function implemented by OpenGL. When the function succeeds, the return value is the address of the extension function. When no current rendering context exists or the function fails, the return value is NULL. To get extended error information, call GetLastError.
pwa/p2js: | Not supported, specifically this routine is essential and extensively used in demo/pGUI/opengl.e (available via a stub include in the standard builtins directory) whereas for pwa/builtins/opengl.js (which is a hand-crafted replacement) it is not needed and is not available. Any missing functionality that might need this routine is probably best implemented by extending both those files in tandem.
Remarks | The OpenGL library supports multiple implementations of its functions. Extension functions supported in one rendering context are not necessarily available in a separate rendering context. Thus, for a given rendering context in an application, use the function addresses returned by the wglGetProcAddress function only. The spelling and the case of the extension function specified by name must be identical to that of a function supported and implemented by OpenGL. Because extension functions are not exported by OpenGL, you must use wglGetProcAddress to get the addresses of vendor-specific extension functions. The extension function addresses are unique for each pixel format. All rendering contexts of a given pixel format share the same extension function addresses.
See Also: | glGetString, DEV See also OpenGL on Windows WGL Functions //glGetString wglMakeCurrent