Built-in attribute arrays are not set using glVertexAttribPointer , but with features like glVertexPointer , glColorPointer , .... And you turn them on by calling glEnableClientState with constants like GL_VERTEX_ARRAY , GL_COLOR_ARRAY , ... instead of glEnableVertexAttribArray .
While nVidia glVertexAttribPointer may work, due to their smoothing of user attribute indexes with built-in attributes, this is not a standard match, and I'm sure you cannot expect this on any other hardware vendor. Therefore, to use special attributes and glVertexPointer/glNormalPointer/... for bultin attributes, use glVertexAttribPointer , as well as the corresponding on / off functions.
Remember that inline attributes are deprecated anyway, along with the specified functions. Therefore, if you want to write modern OpenGL code, you must define your own attributes anyway. But perhaps you need to support legacy shaders or not care about advanced compatibility at the moment.
Christian rau
source share