Search code examples
openglosx-mavericksqt5

glVertexAttribDivisor in Qt5 + OS X Mavericks


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


Solution

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