Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know this question may sound a little bit silly but I'd like to know if there is a way to do what I pretend without "Brute forcing".

I am developing a quit big application that uses some OpenGL Stuff, for GUI purposes. I've been using a lot of extensions of OpenGL. Everything was done in a machine with a good Graphical Card, so everything always worked fine.

Now I tested my application in a machine with weaker graphical card - The first one supports a lot of opengl 4 features, the second one only up to a few from version 3 - and, unfortunately, a couple of things are not being displayed.

I'd say the reason is that, somehow, I am using an extension which is not supported on the weaker machine, however I've got no single clue which extension or feature may be not supported.

So, the question is is there any way that I can find out which extension it is by, for example, disabling one extension somehow and checking if it still works on the good machine. My problem is that the code is quite big to start commenting line by line on the good machine until I experience the same problem.

share|improve this question

migrated from Oct 3 '12 at 7:20

This question came from our site for professional and enthusiast programmers.

You forgot to mention the OS :) There are system dependent tools doing that. – count0 Oct 2 '12 at 13:18
I'd use the OpenGL Extensions Viewer. If memory serves, it can produce lists in CSV files (or something similar), which should make comparison fairly simple (e.g., with diff). – Jerry Coffin Oct 2 '12 at 13:20

You can enumerate the available OpenGL extensions using the call


Testing for a extension in particular requires a bit care. This function can be found on the OpenGL wiki:

// Helper to check for extension string presence.  Adapted from:
static int isExtensionSupported(const char *extList, const char *extension)

  const char *start;
  const char *where, *terminator;

  /* Extension names should not have spaces. */
  where = strchr(extension, ' ');
  if ( where || *extension == '\0' )
    return 0;

  /* It takes a bit of care to be fool-proof about parsing the
     OpenGL extensions string. Don't be fooled by sub-strings,
     etc. */
  for ( start = extList; ; ) {
    where = strstr( start, extension );

    if ( !where )

    terminator = where + strlen( extension );

    if ( where == start || *(where - 1) == ' ' )
      if ( *terminator == ' ' || *terminator == '\0' )
        return 1;

    start = terminator;

  return 0;
share|improve this answer
Note that if you're using a core GL context, you need to be using glGetStringi(GL_EXTENSIONS). – Nicol Bolas Oct 2 '12 at 17:25

You usually can get a list of the extensions via calls to the OpenGL api. E.g. on linux use glxinfo to see a list of the extensions.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .