# How do I find out which functions are deprecated for specific OpenGL profiles?

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.

• 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 – bobobobo Sep 12 '12 at 0:44
• For legacy OpenGL (before version 3), there is a dedicated article: khronos.org/opengl/wiki/Legacy_OpenGL – baptx Aug 31 '18 at 22:09

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).

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.

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

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'.

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