The guidelines in this section will ensure that your functionality checking code is thorough yet efficient. See “Detecting Functionality” for specific details on implementing these guidelines.
Don't rely on what's in a header file. A command declaration in a header file does not ensure that a feature is supported by the current renderer. Neither does linking against a stub library that exports a function.
Make sure that a renderer is attached to a valid rendering context before you check the functionality of that renderer.
Check the API version or the extension name string for the current renderer before you issue OpenGL commands.
Check only once per renderer. After you've determined that the current renderer supports an OpenGL command, you don't need to check for that functionality again for that renderer.
Ensure that your code supports a feature, whether the feature is part of the core OpenGL API or is an extension. Keep in mind that different constants and command names are often used for functionality that is both part of the core API and an extension.
Enable only those OpenGL features that are tested. Enabling untested features can lead to application failures.
Last updated: 2008-06-09