glVertexAttribPointer in OpenGL and in OpenGLES

前端 未结 2 977
余生分开走
余生分开走 2021-02-06 04:31

I\'m reading tutorials about OpenGL and OpenGLES and I\'m a bit confused about the use of the function glVertexAttribPointer in these two APIs.

In the

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-06 04:57

    GL spec clearly mentions this:

    case 1: If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER target while a generic vertex attribute array is specified, pointer is treated as a byte offset into the buffer object's data store.

    case 2: Specifies a pointer to the first component of the first generic vertex attribute in the array.

提交回复
热议问题