7
\$\begingroup\$

I would like to get the list of functions that are part of a certain OpenGL profile and the list of the ones that are deprecated so that I can avoid those.

\$\endgroup\$
  • \$\begingroup\$ I believe that when using a deprecated feature, you should see an error when you call glGetError(). If you call glGetError() after every gl* call, you may be able to root them out that way \$\endgroup\$ – bobobobo Sep 12 '12 at 0:44
  • \$\begingroup\$ For legacy OpenGL (before version 3), there is a dedicated article: khronos.org/opengl/wiki/Legacy_OpenGL \$\endgroup\$ – baptx Aug 31 '18 at 22:09
9
\$\begingroup\$

The true source of this information is in the various OpenGL specifications. They contain a list of what functions there are, what their definitions are, what enumerators those functions take, and so forth. For each OpenGL version.

If you want what was removed (deprecated means "present but not advised to use". When something is removed, it is removed), the 3.1 spec section E.2.2 has a list of the removed functionality.

However, if you simply want to avoid non-core functions, you should use an OpenGL loading library that has headers that exclude removed functions. GL3w can work in this capacity, but it doesn't load extensions. The only one I know of that does this is my own (which is why I wrote it; to get rid of the non-core cruft).

\$\endgroup\$
2
\$\begingroup\$

As an alternative to navigating the registry PDFs.

The quickest/easiest way I have found is to do a search in the raw gl.spec file. It's the file from which the other stuff is generated, not designed to be human readable but isn't bad.

Just remove the leading prefixes, gl or GL_ from the name. The entries have a deprecated property as well as adding them to a deprecated category. It also tells you at what version it was introduced so you know when it's been made available.

You could also process them using a simple script to extract the information and put it into a list.

\$\endgroup\$
  • \$\begingroup\$ Or you could just download these XML files, which have the same contents, just in a much more reasonable format. \$\endgroup\$ – Nicol Bolas Sep 12 '12 at 6:54
1
\$\begingroup\$

You have all this information in he OpenGL Registry. There you can check the current OpenGL API, OpenGL Shading Language and GLX Specifications and Reference Pages, as well as the old versions'.

\$\endgroup\$
  • \$\begingroup\$ where is the list exactly? \$\endgroup\$ – user827992 Sep 11 '12 at 20:10
  • \$\begingroup\$ Depends on which version you want to look at. Here you have the Reference for OpenGL 4. Here the rest of the documentation. \$\endgroup\$ – Dan Sep 11 '12 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.