0

When using instancing in OpenGL under OS X Mavericks and Qt5 see this post for my code I cannot compile when using the function glVertexAttribDivisor the error being

erreur : use of undeclared identifier 'glVertexAttribDivisor'; did you mean 'glVertexAttribDivisorARB'?

I went and used the ARB function but don't know what's the difference between the function with the suffix and the one without it. Can anyone explain me?

Also, is there a way or something I am missing in order to be able to use the correct function (meaning the one without the ARB suffix)?

Community
  • 1
  • 1
BRabbit27
  • 6,333
  • 17
  • 90
  • 161
  • IIRC it shouldn't be a ARB suffixed version on OS X . [What does ARB mean ...](http://stackoverflow.com/questions/2033514/what-does-arb-mean-in-the-opengl-functions) – t.niese Sep 18 '14 at 12:09
  • Is it a problem in Qt5 for OS X or is it a problem from OS X itself. What should I do? – BRabbit27 Sep 18 '14 at 13:05
  • I would say the it is the fault of Qt5 ;). As with a _plain_ OpenGL project only using the regular OS X headers the `glVertexAttribDivisor` exists. Anyway if it is just for a personal project where you try to get into OpenGL you don't need to care about it. `glAnyFunction` and `glAnyFunctionARB` should be in most cases identical. The naming should only tell you that it is an official proposed feature, that might probably change in functionality, but most likely will be added unchanged as a regular function. – t.niese Sep 18 '14 at 13:52

1 Answers1

1

As it is well explained here ARB stands for OpenGL Architecture review board.So the ARB suffix means that the vendor specific extension has been promoted to the core specification,which means,it would be implemented by all the vendors as part of the core functionality.The next step is getting into the core where ARB suffix is finally removed.So for you it doesn't really matter.You should use ARB version which is the same as glVertexAttribDivisor.Apple usually lags with its GL drivers implementation behind the latest standard.If I am not mistaken glVertexAttribDivisor is core since GL 3.3 and it is strange that they still have only ARB variant with GL 4.1 being the latest version supported.

Btw,if you use latest GLEW it does have both ARB and glVertexAttribDivisor core.I personally use it to write modern OpenGL functionality on Mac Maverick.

Community
  • 1
  • 1
Michael IV
  • 11,016
  • 12
  • 92
  • 223
  • The core version is defined if you include the right header file on Mac OS. It's `` for GL3+, while `` was used for older versions. You will also need to create a core profile context to use GL3+. – Reto Koradi Sep 19 '14 at 04:47
  • As far as I remember, OS X has OpenGL 3.2 so maybe that's why the ARB version appears. Nevertheless, since I am using Qt5, both versions appear in the autocomplete of QtCreator but I don't know which version is Qt including, `gl.h` or `gl3.h` This makes me think that there should be a way I can actually use the non-ARB version of it – BRabbit27 Sep 19 '14 at 15:39
  • Maverick comes with GL4.1 so it should be completely possible to use glVertexAttribDivisor without ARB.But it really doesn't matter. – Michael IV Sep 19 '14 at 17:04
  • So it is just because of Qt that maybe still includes `gl`instead of `gl3`. Got it. – BRabbit27 Sep 19 '14 at 18:31